Skip to main content

A fancy print

Project description

flash_msg

from flashmsg import flash_msg

--------------------------------------------------
#### Example 0
flash_msg(['Hello World'])

Output:
 *********************** 
 ***** Hello World ***** 
 *********************** 

--------------------------------------------------
# Example 1
flash_msg(msg=['Hello World',"I hope you find the flash message useful"],
          sign='#',
          bar_length=7,
          bar_name='Example 1')

Output:
 ############################################################################ 
 ####### Example 1 ####### Hello World                                ####### 
 ######################### I hope you find the flash message useful   ####### 
 ############################################################################ 


--------------------------------------------------
# Example 2
flash_msg(msg=['Very important message',"Clowns = Peter",'Specs: Shoes = 49, Costume=L'],
          sign="***",
          bar_length=2,
          bar_name='Fancy',
          color='red')

Output:
 ******************************************************* 
 ****** Fancy ****** Very important message       ****** 
 ******************* Clowns = Peter               ****** 
 ******************* Specs: Shoes = 49, Costume=L ****** 
 *******************************************************



--------------------------------------------------
# Example 3
import random
import string
from random import randint

def randomString(stringLength=10):
    """Generate a random string of fixed length """
    letters = string.ascii_lowercase
    return ''.join(random.choice(letters) for i in range(stringLength))


msg = [ randomString(randint(0, 50))  for i in range(10)]

flash_msg(msg=msg,
          sign="/*-//-*/",
          bar_length=2,
          bar_name='Stranger Things',
          color='green')

Output:
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-// 
 /*-//-*//*-//-*/ Stranger Things /*-//-*//*-//-*/ zzafthrdjhnqytpntowqwzkhrnpdsplrfzcysycahipbuuzaho /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// dmvnqpvbeefcdmxwmvszmrbpvlqtflfizedvlwowgiqxejyp   /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// yshxpnbmdgdzbmzvrxhpuxmyztitrlqnuycofhe            /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// xmakikkyhplqgolngidjowoodqaaxuoep                  /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// yyocmmplpbclnfupchckcifq                           /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// pd                                                 /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// cxrizdltioikxdvzthrzkpmabca                        /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// lktvubqhowwvkkpdjapkfwyvztvxaszgirrfuib            /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// kswlznwq                                           /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*// vvoxgndmxmriba                                     /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flashmsg-0.2.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page