[issue14228] It is impossible to catch sigint on startup in python code

telmich report at bugs.python.org
Sat Dec 21 16:33:16 CET 2013


telmich added the comment:

Victor, the problem is *not* that python exits. This is fine and virtually every other unix program behaves like that.

The problem is that python throws an ugly-to-read and completly senseless backtrace to the novice (end!) user by default. Backtraces are great for debugging and should be treated as such, but not presented to an end user by default.

But I as a developer, who wants to prevent the user seeing a backtrace while she does the most normal thing, this places a huge burden on me and I need to use undocumented workarounds to try to prevent this - in the case of a try... except block around my whole program even without suceess.

The point is that no programming language should shout its internals to an end user and prevent the developer from cushion it easily.

Think about "ls -lR" that throws debugging symbols at you, because you interrupted it - you would not want to see them, nor what you be happy if you had to cushion and especially not if this was not documented and hard to do.

So in short my request is to make python more user friendly by cushion the unnecessary backtrace of a Ctrl-C printed out.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14228>
_______________________________________


More information about the Python-bugs-list mailing list