#NEWLINE# def __init__( self , lines , columns , write_process_input , bell_func = None , get_history_limit = None ) : #NEWLINE# #INDENT# assert isinstance ( lines , int ) #NEWLINE# assert isinstance ( columns , int ) #NEWLINE# assert callable ( write_process_input ) #NEWLINE# assert ( ( bell_func is None ) or callable ( bell_func ) ) #NEWLINE# assert ( ( get_history_limit is None ) or callable ( get_history_limit ) ) #NEWLINE# bell_func = ( bell_func or ( lambda : None ) ) #NEWLINE# get_history_limit = ( get_history_limit or ( lambda : 2000 ) ) #NEWLINE# self . _history_cleanup_counter = 0 #NEWLINE# self . savepoints = [ ] #NEWLINE# self . lines = lines #NEWLINE# self . columns = columns #NEWLINE# self . write_process_input = write_process_input #NEWLINE# self . bell_func = bell_func #NEWLINE# self . get_history_limit = get_history_limit #NEWLINE# self . reset ( )