#NEWLINE# def exit( self ) : #NEWLINE# #INDENT# '\n        Set exit. When Control-D has been pressed.\n        ' #NEWLINE# on_exit = self . application . on_exit #NEWLINE# self . _exit_flag = True #NEWLINE# self . _redraw ( ) #NEWLINE# if ( on_exit == AbortAction . RAISE_EXCEPTION ) : #NEWLINE# #INDENT# def eof_error( ) : #NEWLINE# #INDENT# raise EOFError ( ) #NEWLINE# #UNINDENT# self . _set_return_callable ( eof_error ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( on_exit == AbortAction . RETRY ) : #NEWLINE# #INDENT# self . reset ( ) #NEWLINE# self . renderer . request_absolute_cursor_position ( ) #NEWLINE# self . current_buffer . reset ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( on_exit == AbortAction . RETURN_NONE ) : #NEWLINE# #INDENT# self . set_return_value ( None )