#NEWLINE# def end_progress( self , msg = 'done.' ) : #NEWLINE# #INDENT# assert self . in_progress , 'Tried to end_progress without start_progress' #NEWLINE# if self . stdout_level_matches ( self . NOTIFY ) : #NEWLINE# #INDENT# if ( not self . in_progress_hanging ) : #NEWLINE# #INDENT# sys . stdout . write ( ( ( ( '...' + self . in_progress ) + self ) + '\n' ) ) #NEWLINE# sys . stdout . flush ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sys . stdout . write ( ( msg + '\n' ) ) #NEWLINE# sys . stdout . flush ( ) #NEWLINE# #UNINDENT# #UNINDENT# self . in_progress = None #NEWLINE# self . in_progress_hanging = False