[IPython-user] Cygwin - stdout encoding problem

Standaert Arnout arnout.standaert@vito...
Thu Jan 29 01:18:28 CST 2009

> -----Original Message-----
> From: Jörgen Stenarson [mailto:jorgen.stenarson@bostream.nu]
> Sent: woensdag 28 januari 2009 21:36
> Subject: Re: [IPython-user] Cygwin - stdout encoding problem
> > 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:
> I have tried to replicate your problem but I get an
> ImportError (windll library loader is not available in
> ctypes) when I try to use pyreadline under cygwin python 2.5.2.

I'm sorry, I should have been clearer. I'm using ActiveState Python 2.5.2 in combination with Cygwin's Bash shell.

> However have you tried to set pyreadline_codepage to a value
> that is consistent with your console. If you do this at the
> top of your ipy_user_conf.py file this should set
> pyreadline_codepage to a sensible value before it is used.

I'll give that a shot later today.

> It also looks like you have an older version of pyreadline.

This is the 1.5 version, I'll try trunk later today too.

Thanks for the hints,

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