En Wed, 15 Aug 2007 14:20:26 -0300, Corbitt, Kyle <[EMAIL PROTECTED]>  
escribi�:

> 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

Use the ctypes module. Read the tutorial - you have to set the restype  
attribute on functions.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to