>> I want to specify the Python path before calling Py_Initialize(), and I >> don't want it to use *any* environment variables which (again) set the >> flags. So I thought of Py_InitializeEx() which would take parameters >> specifying these things, and Py_Initialize() could be changed to call >> Py_InitializeEx(NULL), maybe. > > If you don't want the environment to be used, set the global > Py_IgnoreEnvironmentFlag before calling Py_Initialize(). I didn't know that, thanks for the hint. [...] >> Does it make more sense now? > > Not quite -- I don't understand why *you* don't want the environment > variables to be used, if all you want is a better pythonw.exe. I did probably mix two different things here. > If that's your only experience with embedding Python, you can't really > speak for other embedders. That may be - my other experiences are py2exe and the embedding done in bdist_wininst. Now knowing Py_IgnoreEnvironmentFlag I would be satisfied with the addition of a PySys_SetPath function ;-). Thomas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4