#NEWLINE# def spinner_func( before = '' , after = '' ) : #NEWLINE# #INDENT# ( write , flush ) = ( sys . stdout . write , sys . stdout . flush ) #NEWLINE# while True : #NEWLINE# #INDENT# for char in DISPLAY : #NEWLINE# #INDENT# msg = '{} {} {}' . format ( before , char , flush ) #NEWLINE# write ( msg ) #NEWLINE# flush ( ) #NEWLINE# write ( ( '\x08' * len ( msg ) ) ) #NEWLINE# time . sleep ( DELAY )