kcorbitt at api.com
Wed Aug 15 19:20:26 CEST 2007
I'm running Linux with Python 2.3. I have a C shared object file (*.so) and I need to be able to call its functions from within Python. I have found a couple of Python modules that allow me to do this (dl, ctypes) but unfortunately I am only able to get them to return integers, even for function calls that I KNOW the library is supposed to return other types for. I need the library to be able to return doubles, 2D arrays and hopefully strings as well. I do have access to the C source code that the library was compiled from and can change it if necessary but I know even less about C than I do about Python so it'd be great if I could avoid that.
Keep in mind that I am a python newbie (I only have a few weeks' experience) so the more detailed you can make your response, the better. Example code would be great. I'm sure there's a way to do this but I've been bashing my head against this problem for a couple days now and haven't made much progress.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list