Marc-Andre Lemburg added the comment: > 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 eGenix.com Professional Python Services directly from the Source (#1, Oct 05 2012) >>> Python Projects, Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2012-09-27: Released eGenix PyRun 1.1.0 ... http://egenix.com/go35 2012-09-26: Released mxODBC.Connect 2.0.1 ... http://egenix.com/go34 2012-09-25: Released mxODBC 3.2.1 ... http://egenix.com/go33 2012-10-23: Python Meeting Duesseldorf ... 18 days to go eGenix.com 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 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16129> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com