[Dream] A meta-wrapper module to interface any C dynamic library

Ronald Oussoren oussoren at cistron.nl
Fri Jul 4 14:03:19 CEST 2003


On Friday, Jul 4, 2003, at 12:59 Europe/Amsterdam, Francesco Bochicchio 
wrote:

> Hi all,
>
> I was wondering if it would be possible to make a module which allows 
> to
> do something like that:
>
> 	import c_interface
> 	math_lib = c_interface.load('math.so', 'math.h' )
> 	sin_f = math_lib.get_function('sin')
> 	print "sin(3.14) = %f" % sin_f (3.14)
>
> The idea would be to make a module that allows to use any C dynamic
> library ( I used an hypothetical math.so only as example ) without
> the need of a specific wrapper module.

See http://starship.python.net/crew/theller/ctypes.

Ronald






More information about the Python-list mailing list