[docs] PyImport_ExecCodeModuleWithPathnames documentation is wrong
Florian Link
florian.link at mevis.de
Tue Dec 12 09:26:11 EST 2017
Hi,
the PyImport_ExecCodeModuleWithPathnames documentation states that the
char* strings should be encoded in UTF-8.
But looking at the Python C code, it is aparent that
PyUnicode_DecodeFSDefault is used to convert these string, so the
documentation need to state the the string should be encoded as in the
default of the local filesystem.
https://docs.python.org/3/c-api/import.html#c.PyImport_ExecCodeModuleWithPathnames
regards,
Florian
P.S. I ran into this because I passed in UTF-8 and the __file__
attribute of the imported modules was wrong afterwards.
--
------------------------------------------------------------------------
Florian Link
MeVisLab
Tel.: +49-421-22495 579
Fax: +49-421-22495 899
www.mevis.de / www.mevislab.de
MeVis Medical Solutions AG
Caroline-Herschel-Str. 1
28359 Bremen
Germany
Trade Registry: Bremen HRB 23791
VAT ID: DE250659412
Executive Board: Marcus Kirchhoff (Chairman), Dr. Robert Hannemann
Chairperson of Supervisory Board: Kimberley E. Honeysett
More information about the docs
mailing list