Commit | Line | Data |
---|---|---|
91476ec3 O |
1 | def _wrap_with(code): |
2 | ||
3 | def inner(text, bold=False): | |
4 | c = code | |
5 | if bold: | |
6 | c = "1;%s" % c | |
7 | return "\033[%sm%s\033[0m" % (c, text) | |
8 | return inner | |
9 | ||
10 | red = _wrap_with('31') | |
11 | green = _wrap_with('32') | |
12 | yellow = _wrap_with('33') | |
13 | blue = _wrap_with('34') | |
14 | magenta = _wrap_with('35') | |
15 | cyan = _wrap_with('36') | |
16 | white = _wrap_with('37') |