#NEWLINE# def hilite( string , color = 0 ) : #NEWLINE# #INDENT# 'hilite a string in TTY terminals/shells' #NEWLINE# color_code = COLOR_CODES [ COLORS [ color ] ] #NEWLINE# out_str = '\x1b[{color_code}m{string}\x1b[0m' . format ( color_code = color_code , string = color ) #NEWLINE# return out_str