本文整理汇总了Python中blessed.Terminal.bright_black方法的典型用法代码示例。如果您正苦于以下问题:Python Terminal.bright_black方法的具体用法?Python Terminal.bright_black怎么用?Python Terminal.bright_black使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blessed.Terminal
的用法示例。
在下文中一共展示了Terminal.bright_black方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Terminal
# 需要导入模块: from blessed import Terminal [as 别名]
# 或者: from blessed.Terminal import bright_black [as 别名]
from random import seed, randint
from sys import stdout
from blessed import Terminal
layers = ([], [], [],)
term = Terminal()
lastrow = [u' ' for i in range(term.width)]
snow = (term.bright_black(u'.'), term.white(u','), term.bright_white(u'*'))
progress_template = u' _.,m%#@'
prog_len = len(progress_template)
progress = {}
seed()
iteration = 0
layers_length = len(layers)
last = layers_length - 1
rollover = last * 2
def generate_line(layer):
line = []
limit = layer * 10
threshold = layer * 9.9
for i in range(term.width):
if randint(0, limit) < threshold:
line.append(False)
else:
line.append(True)
return line