gpt4 book ai didi

python - PyScripter - 无法使用 KeyboardInterrupt 终止运行

转载 作者:太空宇宙 更新时间:2023-11-03 14:35:09 28 4
gpt4 key购买 nike

我写了很多我用的小应用

try:
print "always does this until I Ctrl+C"


Except KeyboardInterrupt:
print "finish program"

我刚刚开始放弃使用 IDLE 并启动 PyScripter。但是 CTRL+C 不再有效。在使用内置解释器时是否仍然可以发送 KeyboardInterrupt

最佳答案

在 PyScripter 中,如果您只想终止正在运行的程序,您可以随时重新初始化远程引擎:

  • 应用程序运行菜单 > Python 引擎 > 重新初始化 Python 引擎或
  • 解释器上下文菜单 > Python 引擎 > 重新初始化 Python 引擎或
  • 键盘快捷键 CTRL-F2

Source, Psyscripter Author

关于python - PyScripter - 无法使用 KeyboardInterrupt 终止运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2246885/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com