Python and location of .so files?
Efrat Regev
efrat_regev at yahoo.com
Tue Jan 10 11:20:02 EST 2006
Carsten Haese wrote:
> On Tue, 2006-01-10 at 09:42, Efrat Regev wrote:
>
>> Hello,
>>
>> 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 hello.so 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?
>
>
> Yes. See
> http://docs.python.org/tut/node8.html#SECTION008110000000000000000 for
> information on Python's module search path.
>
> Hope this helps,
>
> Carsten.
>
>
Perfect. Thank you very much!
More information about the Python-list
mailing list