Embedding Python: How To Hardwire Module Search Path
Robert Kiendl
rkiendl at gmx.net
Fri Apr 7 08:57:36 EDT 2000
I've embedded python into a C++ - windows app by a
PyImport_AppendInittab() + Py_Initialize() method.
Py_Initialize() calculates a module search path from the
windows-registry settings.
I want to prevent Python from doing that and want to hardwire the search
path to a app. relative path ("<app>/pythonmod") which points to a
minimal python bunch to avoid the need for installing python.
Does anybody know what to do prior to Py_Initialize(). Or am I
completely wrong?
PySys_SetPath() crashes when called before Py_Initialize().
Robert
More information about the Python-list
mailing list