Inconsistent raw_input behavior after Ctrl-C

Gabriel Genellina gagsl-py2 at
Wed Oct 21 04:48:56 CEST 2009

En Tue, 20 Oct 2009 19:09:00 -0300, Maxim Khitrov <mkhitrov at>  

> I ran into a rather strange problem when interrupting a raw_input call
> with Ctrl-C. This is with python 2.6.3 on Windows 7. When the call is
> interrupted, one of two things happen - either a KeyboardInterrupt
> exception is raised or raw_input raises EOFError, and
> KeyboardInterrupt is raised a line or two later.

I could not reproduce it with XP so it may be an issue with Windows 7 only.

Gabriel Genellina

More information about the Python-list mailing list