[New-bugs-announce] [issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

Rebecca Breu report at bugs.python.org
Mon Sep 24 12:48:56 CEST 2007

New submission from Rebecca Breu:

Run the program:

while True:
        s = raw_input('> ')

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

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

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.

components: None
messages: 56109
nosy: Rebecca
severity: normal
status: open
title: Problems on Linux with Ctrl-D and Ctrl-C during raw_input
versions: Python 2.5

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list