[issue1294] Management of KeyboardInterrupt in cmd.py

Raghuram Devarakonda report at bugs.python.org
Fri Nov 13 15:56:11 CET 2009


Raghuram Devarakonda <draghuram at gmail.com> added the comment:

> I am not sure I understand: currently Ctrl-C generates a
> KeyboardInterrupt, which can be caught by the  application which can
> then decide how to proceed (in particular it  can start another command
> loop or exit with a meaningful message or anything else).
>
> This patch would suppress KeyboardInterrupt and thus interfere with such
> applications. Or am I missing something?

I checked the patch and tested with python from trunk. You are right
that the patch catches KeyboardInterrupt thus interfering with any
applications that expect it to be propagated upstream.  Perhaps, this
can be made conditional so that we can keep both behaviors.

But CTRL-D processing doesn't suffer from any backwards compatible
issues and that part of the patch should be able to be applied safely.

----------

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


More information about the Python-bugs-list mailing list