What is the encoding of __file__?
"Martin v. Löwis"
martin at v.loewis.de
Mon Jan 7 17:06:13 EST 2008
> can someone quickly tell me what the encoding of __file__ is? I can't
> find it in the documentation.
>
> BTW, I'm using Python 2.5.1 on WIndows XP and Vista.
It's platform-specific - the same encoding that is used for file names
(i.e. sys.getfilesystemencoding()). On Windows, it will be "mbcs", which
in turn is installation-specific - on Western European/US installations,
it's "windows-1252".
Regards,
Martin
More information about the Python-list
mailing list