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.6112166e-09
Marked as misclassified No
Message-id <1331230249.37.0.418896595509.issue14228@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-08 18:10:49telmichsetrecipients: + telmich, pitrou
2012-03-08 18:10:49telmichsetmessageid: <1331230249.37.0.418896595509.issue14228@psf.upfronthosting.co.za>
2012-03-08 18:10:48telmichlinkissue14228 messages
2012-03-08 18:10:48telmichcreate