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 lemburg
Recipients ideasman42, lemburg, loewis, vstinner
Date 2012-10-05.07:02:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> IMHO either of these solutions would be fine.
> * have a PyOS_PutEnv() function, gettext has gettext_putenv() to
> workaround this problem.

This solution would help in many other cases as well, so adding
such an API would certainly help more than specialized interfaces.

> * manage this the same as Py_GetPythonHome(), which can be defined by
> the embedding application to override the default.

I think you meant Py_SetPythonHome().

Given that the IO encoding is very important for Python 3.x, a special
API just for setting the encoding may be useful to have as well.

Care must be taken, though, that the encoding cannot be set after
Py_Initialize() has been called.

It may overall be easier to go with the PyOS_PutEnv() solution to
not run into the problems with having to check for an initialized
interpreter first.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Oct 05 2012)
>>> Python Projects, Consulting and Support ...
>>> mxODBC.Zope/Plone.Database.Adapter ...
>>> mxODBC, mxDateTime, mxTextTools ...
2012-09-27: Released eGenix PyRun 1.1.0 ...
2012-09-26: Released mxODBC.Connect 2.0.1 ...
2012-09-25: Released mxODBC 3.2.1 ...   
2012-10-23: Python Meeting Duesseldorf ...                 18 days to go Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
Date User Action Args
2012-10-05 07:02:42lemburgsetrecipients: + lemburg, loewis, vstinner, ideasman42
2012-10-05 07:02:42lemburglinkissue16129 messages
2012-10-05 07:02:41lemburgcreate