[IPython-user] KeyboardInterrupt (Ctrl-C) weirdness

gooli egooli@gmail....
Tue Mar 17 17:13:12 CDT 2009


I'm running Python 2.5.4 and IPython 0.9.1 with PyReadline 1.5 on Windows XP
SP3 and I'm seeing some weird behavior with regards to hitting Ctrl-C while
running in an infinite loop.

I type the following code in:

while True:
    i = 0

and once it starts to run I hit Ctrl-C to stop it, which does stop the loop
but creates an anomaly. If I type a command and hit Enter, I get an error
message from Windows cmd.exe ('sdf' is not recognized as an internal or
external command) and get the standard C:\> command prompt. However, when I
hit Enter again, I get the IPython green prompt back. Another Enter, back to
command prompt, another one, back to IPython.

Although I seem to be jumping between cmd and IPython all the commands that
I type seem to go to cmd with their first character removed. Accidentally I
discovered that when I type exit in the IPython prompt and then hit Enter
twice, things seem to get back to normal.

Since this might not easily reproduce on another system and my explanation
above might be a bit vague, I've recorded a screen cast of what's happening.

http://www.gooli.org/downloads/ipython-ctrl-c.avi



-- 
View this message in context: http://www.nabble.com/KeyboardInterrupt-%28Ctrl-C%29-weirdness-tp22568995p22568995.html
Sent from the IPython - User mailing list archive at Nabble.com.



More information about the IPython-user mailing list