#NEWLINE# def _print_colored_line( self , text , value = None , indent = 0 ) : #NEWLINE# #INDENT# ' Print a colored line depending on its indentation level\n            Attributes:\n                text: string line\n                split_symbol: if you want an output with different in-line colors\n                indent_plus: integer to add a plus indentation\n        ' #NEWLINE# text = text . strip ( ) #NEWLINE# if ( not text ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# text_color = Printer . INDENT_COLOR . get ( indent , Color . BRIGHT_WHITE ) #NEWLINE# indent_text = ( ( ' ' * Printer . INDENT_SPACES ) * indent ) #NEWLINE# if ( value is not None ) : #NEWLINE# #INDENT# value_color = Color . BRIGHT_WHITE #NEWLINE# self . _out . write ( ( '%s%s: ' % ( indent_text , text ) ) , text_color ) #NEWLINE# self . _out . writeln ( value , value_color ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _out . writeln ( ( '%s%s' % ( indent_text , text ) ) , indent )