#NEWLINE# def _colorize( self , c , color = 'red' , bold = True ) : #NEWLINE# #INDENT# attr = [ ] #NEWLINE# attr . append ( color . COLORS [ color ] ) #NEWLINE# if bold : #NEWLINE# #INDENT# attr . append ( '1' ) #NEWLINE# #UNINDENT# return ( '\x1b[%sm%s\x1b[0m' % ( ';' . join ( attr ) , c ) )