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() !!!
exit()
Is there a way to override the default behavior for IPython to make it exit without a hint?
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 *.
Ctrl-D
c.TerminalInteractiveShell.confirm_exit = False
If you do not already have a configuration file, run ipython profile create to create it.
ipython profile create
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
$HOME/.ipython/profile_default/ipython_config.py
In ipython version 0.11 or higher,
--no-confirm-exit
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
just enter Exit , with capital E
Exit
E
Alternatively, start IPython with:
$ ipython -noconfirm_exit
Or for newer versions of IPython:
$ ipython --no-confirm-exit
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.