#NEWLINE# def _print( self , s , pos = None ) : #NEWLINE# #INDENT# if ( not supports_color ( self . _out ) ) : #NEWLINE# #INDENT# s = STRIP_COLORS . sub ( '' , s ) #NEWLINE# self . _out . write ( ( s + '\n' ) ) #NEWLINE# self . _out . flush ( ) #NEWLINE# return #NEWLINE# #UNINDENT# with self . _lock : #NEWLINE# #INDENT# if pos : #NEWLINE# #INDENT# self . _out . write ( '\x1b[{}B' . format ( pos ) ) #NEWLINE# #UNINDENT# self . _out . write ( '\r{}\x1b[K\r' . format ( s ) ) #NEWLINE# if pos : #NEWLINE# #INDENT# self . _out . write ( '\x1b[{}A' . format ( pos ) ) #NEWLINE# #UNINDENT# self . _out . flush ( )