示例#1
0
def color(c, s):
    return ansi.set_foreground(c) + s + ansi.set_foreground(ansi.black)
示例#2
0
def color(c, s):
    return ansi.set_foreground(c) + s + ansi.set_foreground(ansi.default_color)
示例#3
0
def set_color((bg, fg)):
    sys.stdout.write(ansi.set_background(bg))
    sys.stdout.write(ansi.set_foreground(fg))