Keyboard interrupts, Idle vs. SciTE
Neil Hodgson
nyamatongwe+thunder at gmail.com
Thu Nov 2 17:53:23 EST 2006
John Ladasky:
> Under SciTE, I do not get my "exiting program" message. Instead, I get
> the standard SciTE abort message:
>
>
>> Process failed to respond; forcing abrupt termination...
>> Exit code: 1
>
>
> I much prefer the SciTE environment to Idle. Is there any way that I
> can rewrite my program to restore the keyboard interrupt function under
> SciTE? Alternately, is there some setting that I can change in SciTE
> to accomplish the same effect?
This is on Windows - its generally a good idea to say which platform
you are using. SciTE runs Python as an external process and tries to
interrupt by writing a Ctrl+Z to the input of the running process which
works for many interactive programs. If that fails, it calls
TerminateProcess and displays the message you see.
There is some dead code to call
GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT... in scite/src/SciTEWin.cxx
that you could try to enable and rebuild SciTE.
Idle may be running the code in-process but even if it is running it
out of process in debugging mode, it still has much more knowledge of
the execution environment. SciTE uses the same code for running Python
as for running grep or javac.
Neil
More information about the Python-list
mailing list