#NEWLINE# def tick( self , count , total ) : #NEWLINE# #INDENT# if total : #NEWLINE# #INDENT# perc = ( '%0.1f' % ( count / ( total / 100.0 ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# perc = '0.0' #NEWLINE# #UNINDENT# if ( ( perc == self . oldperc ) and ( not ( count == total ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . oldperc = perc #NEWLINE# lstot = len ( str ( total ) ) #NEWLINE# awidth = ( ( self . width - 10 ) - lstot ) #NEWLINE# arrow = ( ( '=' * int ( ( ( awidth * ( float ( perc ) / 100.0 ) ) - 1 ) ) ) + '>' ) #NEWLINE# self . write ( ( ( ( ( ( '%5s%%[%-' + str ( awidth ) ) + 's] %' ) + str ( lstot ) ) + 'd' ) % ( perc , arrow , count ) ) )