[Python-Dev] Improve Python for embedding (original) (raw)

Thomas Heller theller at python.net
Mon Dec 22 15:15:08 EST 2003


I want to specify the Python path before calling PyInitialize(), and I don't want it to use any environment variables which (again) set the flags. So I thought of PyInitializeEx() which would take parameters specifying these things, and PyInitialize() could be changed to call PyInitializeEx(NULL), maybe. If you don't want the environment to be used, set the global PyIgnoreEnvironmentFlag before calling PyInitialize().

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



More information about the Python-Dev mailing list