ipython/ipython — Issue #1321: I/O doesn't work in windows qt-console when running shell command
Author: m-paradox
Created: 2012-01-25 05:39:20+00:00
State: open

I first noticed this when trying to hit ctrl-C and ctrl-break to interrupt a program. Some experimentation reveals that the I/O of the program being run is not properly piped to/from the console. I'm running the 64-bit version of ipython 0.12 in Windows 7.

As a simple example, consider the command 'pause'. In a dos prompt, it sits there with the 'Press any key to continue...' message until a key is pressed:

C:\>pause
Press any key to continue . . .

C:\>

In IPython, it freezes, and the only way to continue is to kill and restart the ipython kernel. It does not print the 'Press any key to continue...' message:

In [10]: !pause
[and ipython is frozen, unresponsive to any key-presses or the 'Interrupt Kernel' menu command]

A comparable program, the shell used in cygwin (http://code.google.com/p/mintty/), also handles this command incorrectly, but not as badly as ipython. In this case, hitting the enter key is necessary to continue, other keys are improperly cached, then processed after enter is pressed:

$cmd /c pause
Press any key to continue . . . jejkejkejkf

$ejkejkejkf
-bash: ejkejkejkf: command not found
$