Thomas Heller wrote: > Helmut Jarausch schrieb: >> Hi, >> >> how can I specify the paths to be searched for a dynamic library >> to be loaded by ctypes' CDLL class on a Linux system. >> >> Do I have to set os.environment['LD_LIBRARY_PATH'] ? >> > > ctypes passes the argument given to CDLL(path) straight to > the dlopen(3) call, so your system documentation should tell you. >
Thanks, but then it's difficult to use CDLL. Setting os.environ['LD_LIBRARY_PATH'] within the script which calls CDLL is too late. What other methods are possible rather than put an explicit export LD_LIBRARY_PATH=... before running the script, if I don't want to put the dynamic library into a standard system library. Many thanks, Helmut. -- Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany -- http://mail.python.org/mailman/listinfo/python-list