telmich <nico-bugs.python....@schottelius.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to