Calling function in shared lib

Thomas Heller theller at
Wed Jun 4 18:17:09 CEST 2003

Olaf Wasmuth <owasmuth at> writes:

> 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 ?

Sounds almost like ctypes:
although I've never heard it runs on Solaris.

But I'll gladly accept patches!


More information about the Python-list mailing list