Project

General

Profile

1 151 aaronmk
# Exception handling
2
3
csi = '\x1B['
4
5
def set_style(style): return csi+style+'m'
6
7
reset_style = set_style('0')
8
9
def as_style(style, text): return set_style(style)+text+reset_style
10 825 aaronmk
11
def emph_multiline(text): return as_style('7', text)
12
13
def emph(text): return emph_multiline(' '+text+' ')
14
15
def error(text): return as_style('101;97', ' '+text+' ')