有没有办法覆盖IPython的默认行为,使其无需提示退出?
发布于 2018-02-26 15:49:11
如果还想Ctrl-D
在未经确认的情况下退出,请在IPython 0.11中添加c.TerminalInteractiveShell.confirm_exit = False
到配置文件*中。
如果还没有配置文件,请运行ipython profile create
以创建一个。
如果你在Django shell中工作,请注意这。
*配置文件位于:$HOME/.ipython/profile_default/ipython_config.py
发布于 2018-02-26 16:37:42
在ipython版本0.11或更高版本中,
--no-confirm-exit
ipython profile create
以创建它)并将这些行添加到$ HOME / .ipython / profile_default / ipython_config.py中:
c = get_config()
c.TerminalInteractiveShell.confirm_exit = False
https://stackoverflow.com/questions/-100003518
复制相似问题