Calling function in shared lib

Olaf Wasmuth owasmuth at web.de
Wed Jun 4 10:08:39 EDT 2003


I am trying to write python code that is able to invoke
a function that was compiled into a shared library
(actually, FORTRAN routines).  I did succeed for a specific
routine in a specific library, but now I want to do this
in a more flexible way.

That is, given the library path and the "signature" of the
routine (e.g. from a configuration file) at run time, I
would like to call this function from within Python. My
target platform is Unix (Solaris), so I'm thinking of
using the GNU libltdl to access the library and do the
call. But how can I feed the parameters into it ? Did
anybody do this already, or do you have some pointers
for me ?

Regards,

Olaf.




More information about the Python-list mailing list