Author Rebecca
Recipients Rebecca
Date 2007-09-24.10:48:55
SpamBayes Score 0.0199434
Marked as misclassified No
Message-id <1190630936.13.0.318924236509.issue1195@psf.upfronthosting.co.za>
In-reply-to
Content
Run the program:

while True:
    try:
        s = raw_input('> ')
    except:
        pass


Press Ctrl-D and then Ctrl-C, and you get

Traceback (most recent call last):
  File "test.py", line 5, in ?
    s = raw_input('> ')
KeyboardInterrupt

Pressing just Ctrl-D or Ctrl-C continues the loop as expected, Ctrl-D
after Ctrl-C works, too. Only Ctrl-C after Ctrl-D sucks, even when you
try to catch "EOFError" and "KeybordInterrupt" explicitly.

The problem occurs with Python 2.4 and 2.5 on Debian testing, friends
confirmed the error under Ubuntu/2.5 and Gentoo/?.

The error does not occur when you import readline first.


Ah, and by the way: http://docs.python.org/lib/reporting-bugs.html
still links to the sourceforce bucktracker.
History
Date User Action Args
2007-09-24 10:48:56Rebeccasetspambayes_score: 0.0199434 -> 0.0199434
recipients: + Rebecca
2007-09-24 10:48:56Rebeccasetspambayes_score: 0.0199434 -> 0.0199434
messageid: <1190630936.13.0.318924236509.issue1195@psf.upfronthosting.co.za>
2007-09-24 10:48:56Rebeccalinkissue1195 messages
2007-09-24 10:48:55Rebeccacreate