Controlling load location of python22.dll when using Py_Initialize()
Howard Lightstone
howard at eegsoftware.com
Wed Feb 19 01:46:21 EST 2003
quadric at primenet.com wrote in
news:mailman.1045631519.20295.python-list at python.org:
> I am statically linking with python22.lib which is an import/export
> library representing
> python22.dll. I am not using LoadLibrary() and therefore am
> relinquishing control of the
>
[snip]
I answered too fast. I had this EXACT same problem. The solution was
easy. I created a small program which prepended MY path onto the
environment variable (PATH) then spawned my real program.
(Well, actually it did a little more...like see if it could FIND my program
and its parts first. But NO linkages to the Python DLL!)
The spawned program inherits the environment of the spawner (which I made
have MY stuff in front). The M$OFT loader works in the task's environment.
More information about the Python-list
mailing list