#NEWLINE# def _scroll( self , lines ) : #NEWLINE# #INDENT# '\n            Scroll the window up or down.\n\n            :param lines: Number of lines to scroll.  Negative numbers scroll\n                down.\n            ' #NEWLINE# if ( lines < 0 ) : #NEWLINE# #INDENT# sys . stdout . write ( '{}{}' . format ( self . _terminal . move ( 0 , 0 ) , ( self . _terminal . move_up ( ) * ( - lines ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# sys . stdout . write ( '{}{}' . format ( self . _terminal . move ( ( self . height - 1 ) , 0 ) , ( self . _terminal . move_down ( ) * self ) ) )