howto force the python lib-dyn path ?

Peter Hansen peter at engcorp.com
Sun Dec 8 11:43:32 EST 2002


David Voswinkel wrote:
> 
> hi ,
> 
> for an embedded project i use stripped down python version.
> lets say i have under /opt/project/lib/python/ all
> standart python modules and dyn libs.
> i have build libpython2.so and relinked all dynlibs.
> when iam trying to dlopen a plugin based on libpython2.so
> and start an interpreter,then try to import eg. time module.
> python still loads the time.so form /usr/lib/python/lib-dyn.(we
> my vanilla python install sits)
> i tried a bunch of different PYTHONPATHs.
> but even using PYTHONPATH env for to avoid this loading problem is quite
> conventient for me, would prefare to patch the sources of python dyn loader
> can somebody point me the direction where to change python dso loader.
> thanks

Are you looking for PYTHONHOME?  Try "python -h" for details.
Once you set this properly, do an "import sys; sys.prefix" to see
whether it worked.  Also, "sys.path" will let you verify that
everything is okay.

If that's not what you want, maybe try clarifying the question.

-Peter



More information about the Python-list mailing list