This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Arfrever, Brecht.Van.Lommel, asvetlov, christian.heimes, ideasman42, lemburg, loewis, ncoghlan, vstinner
Date 2013-09-16.14:48:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The gory details of the current startup situation are in PEP 432. However, the comprehensive solution described in that PEP isn't going to make it into Python 3.4, so a simpler interim fix would be worthwhile.

Since Blender is designed to support building against the system Python, the trick of forcing Python to link to an alternate implementation of a function won't work.

Inspired by, I suggest offering an API like:

int Py_SetStandardStreamEncoding(char *encoding, char *errors)
    if (Py_IsInitialized()) {
        return -1;
    Py_StandardStreamEncoding = _PyMem_Strdup(encoding);
    Py_StandardStreamErrors = _PyMem_Strdup(errors);

The initstdio function in pythonrun.c would then be updated to use the specified Py_StandardStreamEncoding and Py_StandardStreamErrors if they weren't NULL (since that would indicate an embedding application had called SetStandardStreamEncoding).
Date User Action Args
2013-09-16 14:48:26ncoghlansetrecipients: + ncoghlan, lemburg, loewis, vstinner, christian.heimes, Arfrever, asvetlov, ideasman42, Brecht.Van.Lommel
2013-09-16 14:48:26ncoghlansetmessageid: <>
2013-09-16 14:48:26ncoghlanlinkissue16129 messages
2013-09-16 14:48:25ncoghlancreate