Finding dynamic libraries

Robert Kern robert.kern at
Sun Sep 17 09:34:02 CEST 2006

MonkeeSage wrote:
> Robert Kern wrote:
>> No, his extensions link against other shared libraries which are not Python
>> extensions. Those shared libraries are in nonstandard locations because he is
>> running his tests before installing the libraries and his Python code.
> In that case, couldn't it be done by placing a copy/symlink to the
> shared library in the same directory as the python extension, then
> reload()'ing the extension from the already running python process? I
> think, but am not certain, so don't hold me to it, that dlopen and
> kindred will search the working directory for a library before falling
> back to the cache or LD_LIBRARY_PATH and so on. Worth a shot mabye.

It depends on the OS. Most Linux systems do not.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the Python-list mailing list