#NEWLINE# def get_new_output( self , lines , update_top , stats ) : #NEWLINE# #INDENT# ' Calculate the "new" output from this read. Fake but useful ' #NEWLINE# if ( not ( ( ( stats [ 'cursor_y' ] + 1 ) > self . l ) or ( ( ( stats [ 'cursor_y' ] + 1 ) == self . l ) and ( ( stats [ 'cursor_x' ] + 1 ) > self . c ) ) ) ) : #NEWLINE# #INDENT# return '' #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# num_to_return = ( ( stats [ 'cursor_y' ] - self . l ) + 2 ) #NEWLINE# lines = lines [ ( ( self . l - update_top ) - 1 ) : ] #NEWLINE# new_output = [ ] #NEWLINE# new_output . append ( lines [ 0 ] [ ( self . c - 1 ) : ] . rstrip ( ) ) #NEWLINE# for i in range ( 1 , num_to_return ) : #NEWLINE# #INDENT# new_output . append ( lines [ i ] . rstrip ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return '\n' . join ( new_output )