在 python 中未经确认退出命令
Exit command without confirmation in python
在Python中如果出现exit()
命令,会在退出前确认。我不喜欢每次都单击退出按钮的想法。有没有办法绕过这个确认? (这是使用 IDLE shell)
Ctrl + d 是退出python解释器的快捷键。这适用于 IDLE 和交互式 Python shell(linux、windows 或 osx)。在 IPython shell 中,您将被要求 [y/n] 确认退出。
在Python中如果出现exit()
命令,会在退出前确认。我不喜欢每次都单击退出按钮的想法。有没有办法绕过这个确认? (这是使用 IDLE shell)
Ctrl + d 是退出python解释器的快捷键。这适用于 IDLE 和交互式 Python shell(linux、windows 或 osx)。在 IPython shell 中,您将被要求 [y/n] 确认退出。