发布时间:2019-08-27 07:59:30编辑:auto阅读(1869)
def with_color(string, fg, bg=49): print "\33[0m\33[%d;%dm%s\33[0m" % (fg, bg, string) return 0 def B(string): print "\33[1m%s\33[22m" % string return 0 #front color Red = 1 Green = 2 Yellow = 3 Blue = 4 Magenta = 5 Cyan = 6 White = 7 def fr(string): return with_color(string, Red+30) # Red def fg(string): return with_color(string, Green+30) # Green def fy(string): return with_color(string, Yellow+30) # Yellow def fb(string): return with_color(string, Blue+30) # Blue def fm(string): return with_color(string, Magenta+30) # Magenta def fc(string): return with_color(string, Cyan+30) # Cyan def fw(string): return with_color(string, White+30) # White fr("red") fy("yellow") fm("magenta") fg("green") fc("cyan")
上一篇: Threading in Python-
下一篇: 【python】redis模块
50958
50341
40956
37825
32289
29179
28066
22896
22858
21191
1050°
1728°
1410°
1348°
1609°
1438°
2094°
3636°
3562°
2510°