python fabric源码

it2022-05-05  96

def _wrap_with(code): def inner(text, bold=False): c = code if bold: c = "1;%s" % c return "\033[%sm%s\033[0m" % (c, text) return inner red = _wrap_with('31') green = _wrap_with('32') yellow = _wrap_with('33') blue = _wrap_with('34') magenta = _wrap_with('35') cyan = _wrap_with('36') white = _wrap_with('37')

 

ps 不清楚windows是怎么显示颜色的

转载于:https://www.cnblogs.com/xiaoxiaoxin/p/3300427.html


最新回复(0)