Message155171
| 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:49 | telmich | set | recipients:
+ telmich, pitrou |
| 2012年03月08日 18:10:49 | telmich | set | messageid: <1331230249.37.0.418896595509.issue14228@psf.upfronthosting.co.za> |
| 2012年03月08日 18:10:48 | telmich | link | issue14228 messages |
| 2012年03月08日 18:10:48 | telmich | create |
|