#NEWLINE# def _table_printer( self ) : #NEWLINE# #INDENT# '\n\t\tpretty prints a 1-d list.\n\t\t' #NEWLINE# i = 0 #NEWLINE# while True : #NEWLINE# #INDENT# table = self . get_table_callback ( color = True ) #NEWLINE# if ( len ( table ) > 100 ) : #NEWLINE# #INDENT# table = table [ ( - 100 ) : ] #NEWLINE# #UNINDENT# table = filter ( self . row_filter , table ) #NEWLINE# tlen = len ( table ) #NEWLINE# new_lines_needed = ( ( ( self . sizey - tlen ) - reduce ( ( lambda x , row : ( x + ( len_less_color ( row ) // self . sizex ) ) ) , table , 0 ) ) - 3 ) #NEWLINE# str_table = '\n' #NEWLINE# str_table += '\n' . join ( table ) #NEWLINE# str_table += ( '\n' * new_lines_needed ) #NEWLINE# if self . get_status_callback : #NEWLINE# #INDENT# str_table += ( '\n' + str ( self . get_status_callback ( ) ) ) #NEWLINE# #UNINDENT# str_table += '\n' #NEWLINE# sys . stdout . write ( str_table ) #NEWLINE# gevent . sleep ( self . update )