Python and location of .so files?

Efrat Regev efrat_regev at
Tue Jan 10 15:42:47 CET 2006


   On FC4, I've generated an .so file from C++ which I want to use from 
python. It works when I copy it into /usr/lib/python2.4/site-packages.
(I.e., say I have in that directory, then from the python 
prompt I can 'import hello', and the code works fine). The problem is 
that the said directory requires su - so I'd rather python load my .so 
from a different user-privilege directory (when I type 'import hello'). 
Is there some way to tell python to use a different directory?

   Many thanks for considering this question. Also, it's possible that 
this question belongs in a different forum, and if so, I'd appreciate if 
you'd tell me where.



More information about the Python-list mailing list