Search code examples
pythonpyscripterkeyboardinterrupt

PyScripter - cannot termiate Run with KeyboardInterrupt


I write alot of small apps where I use

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


Except KeyboardInterrupt:
   print "finish program"

I've just began to move away from using IDLE and booted up PyScripter. However CTRL+C no longer works. Is it possible to still send in a KeyboardInterrupt while using the built-in interpreter?


Solution

  • In PyScripter if you just want to terminate a running program you can always re-initialize the remote engine:

    • Application Run Menu > Python Engine > Reinitialize Python Engine or
    • Interpreter context menu > Python Engine > Reinitialize Python Engine or
    • Keyboard shortcut CTRL-F2

    Source, Psyscripter Author