Disable IPython exit confirmation

It is really annoying that every time I type exit() , I get a request with confirmation to exit; Of course I want to go out! Otherwise, I would not have written exit() !!!

Is there a way to override the default behavior for IPython to make it exit without a hint?

+86
python ipython
Sep 15 '11 at 10:21
source share
4 answers

If you also want Ctrl-D c.TerminalInteractiveShell.confirm_exit = False without confirmation, in IPython 0.11 add c.TerminalInteractiveShell.confirm_exit = False to your configuration file *.

If you do not already have a configuration file, run ipython profile create to create it.

Pay attention to this ticket if you work in the Django shell.




* The configuration file is located at: $HOME/.ipython/profile_default/ipython_config.py

+91
Nov 05 '11 at 13:05
source share

In ipython version 0.11 or higher,

  • Run with --no-confirm-exit OR
  • Exiting via "exit" instead of control-D OR
  • Make sure the directory exists (or run ipython profile create to ipython profile create it) and add these lines to $ HOME / .ipython / profile_default / ipython_config.py:

     c = get_config() c.TerminalInteractiveShell.confirm_exit = False 
+24
Mar 01 '13 at 22:16
source share

just enter Exit , with capital E

Alternatively, start IPython with:

 $ ipython -noconfirm_exit 

Or for newer versions of IPython:

 $ ipython --no-confirm-exit 
+17
Sep 15 '11 at 10:23
source share

I like the configuration settings, but until I recognized them, I started using the "Quit" key combination.

 Ctrl+\ 

or

 Ctrl+4 

It just kills what works. No time to ask confirmation questions.

+3
Jun 28 '14 at 20:39
source share



All Articles