This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author telmich
Recipients pitrou, telmich
Date 2012-03-08.18:10:48
SpamBayes Score 2.61122e-09
Marked as misclassified No
Message-id <>
Regarding "feature request": I think this is a *bug*, not a feature request: For me, it is impossible to handle SIGINT correctly with my code, because it is half-handled (exception raised, but impossible to catch) by python itself.

Imho this behaviour should not be possible. Instead python could do the standard sigint behaviour, before reading python code (= exit).

When starting to read "python shipped code" (i.e. stuff that comes with python and is always loaded), it should either implement a handler for sigint OR have sigint signal handler set to ignore.

As soon as control flow is passed over to user code, raising KeyboardInterrupt is fine and I can catch that by enclosing all parts (including import statements) into a try: ... block that does what I want.
Date User Action Args
2012-03-08 18:10:49telmichsetrecipients: + telmich, pitrou
2012-03-08 18:10:49telmichsetmessageid: <>
2012-03-08 18:10:48telmichlinkissue14228 messages
2012-03-08 18:10:48telmichcreate