Controlling load location of python22.dll when using Py_Initialize()

quadric at primenet.com quadric at primenet.com
Tue Feb 18 23:39:04 EST 2003


Hi,

I have embedded Python in an application and would like to control the 
location from
whence the application loads python22.dll  upon calling Py_Initialize().  I 
don't want to
rely on the PATH variable as Python is already installed on this machine 
and I want the
application to load the application specific version of python22.dll.   I 
have tried using
PYTHONPATH and PYTHONHOME but to no avail.  It seems that the applications 
directory
and directories along the PATH are the only ones searched.

I have traced through the source for Py_Initialize() and it seems that the 
Windows Registry
is searched for certain keys and the directories along the PATH.  I am not 
opposed to using
the applications directory but would prefer to control the load location 
myself.

Can someone tell me how to tell Py_Initialize() where to look for python22.dll?


Thanks for your help.






More information about the Python-list mailing list