ipython/ipython — Issue #1324: Hitting ctrl-c in win7 cmd-window ipython produces bizarre hybrid mode
Author: m-paradox
Created: 2012-01-25 07:55:17+00:00
State: open

Once I've hit control-C during a raw_input() prompt, both the DOS cmd prompt and the ipython prompt compete for the screen. With the right incantation, a command can execute as a DOS command and and ipython command, it's quite bizarre. Here's a screen-shot, with its text replicated below.

http://i.imgur.com/0FHFx.png

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\mwiebe>ipython
Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 0.13.dev -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: pause
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
C:\Users\mwiebe\ in ()
----> 1 pause

NameError: name 'pause' is not defined

In [2]: raw_input("test: ")
test: hitting control-C^C
C:\Users\mwiebe>----------------------------------------------------------------
-----------
KeyboardInterrupt Traceback (most recent call last)
C:\Users\mwiebe\ in ()
----> 1 raw_input("test: ")

KeyboardInterrupt:

In [3]: pause
Press any key to continue . . .