[IPython-user] Cygwin - stdout encoding problem

Standaert Arnout arnout.standaert@vito...
Wed Jan 28 10:19:11 CST 2009


Hello,

Just installed ipython 0.9.1 on Python 2.5.2 on a Windows XP system. I intend to use it under Cygwin's Bash shell.
Without installing pyreadline, everything works OK. But when I install pyreadline (want colors!), ipython fails to initialize correctly.

The problem: in "unicode_helper.py", ipython tries to guess the shell's encoding with the line:

        pyreadline_codepage=sys.stdout.encoding

Now, in a Cygwin Bash shell, sys.stdout.encoding is apparently not set, returning a "None" value here. This causes an error further down in the line:

        return text.decode(pyreadline_codepage, "replace")

This returns a TypeError and ipython crash dumps...

Can anyone suggest a solution for this?

Thanks a bunch,
arnout

---
This e-mail, any attachments and the information it contains are confidential and meant only for the use of the addressee(s) only.  Access to this e-mail by anyone other than the addressee(s) is unauthorized.  If you are not the intended addressee (or responsible for delivery of the message to such person), you may not use, copy, distribute or deliver to anyone this message (or any part of its contents) or take any action in reliance on it.  In such case, you should destroy this message and notify the sender immediately.  If you have received this e-mail in error, please notify us immediately by e-mail or telephone and delete the e-mail from any computer.
All reasonable precautions have been taken to ensure no viruses are present in this e-mail and its attachments.  As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use.




More information about the IPython-user mailing list