#NEWLINE# def write( self , text ) : #NEWLINE# #INDENT# 'Uses curses to print in the fanciest way possible.' #NEWLINE# if ( not self . no_color ) : #NEWLINE# #INDENT# text = self . colorize_text ( text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# text = COLOR_ESCAPE_PATTERN . sub ( '' , text ) #NEWLINE# #UNINDENT# text += '\n' #NEWLINE# self . buffer . write ( text ) #NEWLINE# return self