Trouble importing / using a custom text codec

Jurie Horneman jhorneman at pobox.com
Fri Mar 1 08:08:40 EST 2002


Martin von Loewis <loewis at informatik.hu-berlin.de> wrote in message news:<j4r8n5fxfx.fsf at informatik.hu-berlin.de>...
> I recommend a different strategy. Aim for allowing "cp932" as an
> encoding name. To achieve this, put the following (or something like
> this) into MBCS_codecs/__init__.py

Thanks. I had to actually solve the problem so I took my code out of
the codecs and just called it directly, but at some point in the
future I will try this approach.

I'd still like to know why my approach didn't work, but oh well...

> If you want this to happen at startup time of Python, just add a
> MBCS_codecs.pth file in site-packages, which reads

What is a .pth file?

Jurie Horneman



More information about the Python-list mailing list