Discussion:
unknown
1970-01-01 00:00:00 UTC
Permalink
I think your best solution here might be to just set sys.path yourself
(https://docs.python.org/2/c-api/sys.html#c.PySys_SetPath) just after
Py_Initialize, overwriting the default values. This also gives you
the added benefit of being able to put the Python libraries (Lib/**.py
and PCbuild/*.pyd) wherever you want them (even in the same folder, or
even a zipfile), rather than trying to fit them into where Python
expects them to be, and you don't run the risk of running Python code
that really probably shouldn't have been findable anyway.

Hope this is of some help,
--
Zach
Loading...