[IPython-dev] IPython goes crazy when redirecting stdout on windows

Robert Gomulka r.gom1977 at gmail.com
Tue Jul 22 15:34:29 EDT 2014

It has something to do with colorama :\
When I invoke ipython and write:
import colorama
My prompt becomes garbled and tab completion stops working.
When I call colorama.deinit() they start working (and I still have colored

But when I remove colorama folder and start ipython, I have colors, but
prompt is garbled after import stdout_tst.
Is there any hidden dependency? I'm lost at this point ...

On 22 July 2014 21:24, Robert Gomulka <r.gom1977 at gmail.com> wrote:

> Thank you for your input.
> I've double (triple?) checked my installation, even reinstalled ipython
> and pyreadline, but to no avail.
> To my surprise, when invoking "ipython console" instead of "ipython" (as
> before) works fine - I don't know why.
> I've spotted some information on colorama, which was recently updated on
> my system.
> But I couldn't disable it for testing - after removing
> site-packages/colorama ipython output was still full of colors, so I
> couldn't verify that. (Using older versions gave the same results - bad).
> I have a workaround for now, but still would appreciate further feedback.
> Robert
> On 22 July 2014 18:30, Thomas Kluyver <takowl at gmail.com> wrote:
>> On 22 July 2014 06:16, Robert Gomulka <r.gom1977 at gmail.com> wrote:
>>> After that, when I redirect sys.stdout readline stops working and
>>> command line prompt (in cmd.exe or conemu) starts printing raw characters
>>> instead of interpreting ANSI codes:
>> I guess this will be something you need to work out in pyreadline:
>> https://github.com/pyreadline/pyreadline
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140722/0d8652c6/attachment.html>

More information about the IPython-dev mailing list