[Numpy-discussion] f2py and pygtk on windows

Thomas Kluyver takowl@gmail....
Sat Mar 24 09:09:45 CDT 2012


On 24 March 2012 13:28, David Froger <david.froger@gmail.com> wrote:
> I've had similar problem in the past (but on Gnu/Linux), which was solve
> to by setting the LC_ALL environnement variable to C. (never undersant why).
> (with Bash: export LC_ALL=C)

This rings a bell. I have a feeling importing pygtk can change the
Python default encoding (sys.getdefaultencoding()). That's never
normally changed, so Python 2 code can assume it's always ascii. I
guess pygtk sets the encoding from the system locale, so if it's set
to C, it will use ascii, and the problem won't appear.

Thomas


More information about the NumPy-Discussion mailing list