Effect of Ctrl-C on threaded apps

Laurent Pointal lpointal at planete.net
Fri Dec 8 20:48:06 CET 2000


[posted and mailed]

gtalvola at NameConnector.com wrote in <90pe6a$fo8$1 at nnrp1.deja.com>:

...
>Basically, is there any way to get more control over this behavior?
>I'm using 1.5.2 on NT in case there's a difference.  Ideally, I'd be
>able to register a handler for Ctrl-C that would call a function that
>I specify, then return control to the application at the same place
>it left off without an exception being thrown.
>
>- Geoff

If you have Microsoft online help installed anywhere, search for the C signal 
function. You will see that Ctrl-C support under NT is not nice for processing.
Typically, NT will start a new thread to process the Ctrl-C. And I have seen no 
way to stop it and to be able to stay in Python interpreter when Ctrl-C is 
typed (using Python signal handling module).

If you find a solution... thanks to indicate what it is.

A+

Laurent.




More information about the Python-list mailing list