花哨的图案

flashmsg的Python项目详细描述


快闪消息

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                                     /*-//-*//*-//-*/ 
 /*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//-*//*-//

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java wait()是“if”块或“while”块   java Jenkins在通过jenkinscli创建作业时失败。罐子   数组从文本输入创建Java树   java碰撞检测仅在对象正好击中中心时起作用   java在执行selenium web驱动程序脚本并对其进行验证时调用子JSP页面   javajson与jackson的动态反序列化   javascript将包含情感的字符串传输到服务器   重写子类型Kotlin/Java中的函数类型   java了解如何使用不安全的   java中的selenium Exception(org.openqa.selenium.remote.UnreachableBrowserException)   java如何使用Spring将HttpSession放入Aspect类中?   java从枚举获取信息   java RungeKutta NBody实现不起作用   java如果使用单独的utils类的静态方法添加Firebase事件侦听器,如何删除它们?