need assistance with C extesion

Thomas Heller theller at python.net
Tue Feb 11 12:43:30 EST 2003


djw <dwelch91 at no.spam.attbi.com> writes:

>   Hello all,
> 
> I am having some difficulty creating a C extension on RH8/Py2.2.1. I
> am trying to hand write a C wrapper to wrap an existing library that
> has an API that doesn't seem to be conducive to being made into a
> Python extension (I don't really have the option of changing the API).
> 
> 
> The problem, I think, boils down to the fact that the API passes
> pointers to structs that contain pointers to functions.
> 
> 
> My attempts to use SWIG on this have all failed.

> Are there other ways to handle this that I can't seem to conjure up?

If you are tough, you could try to use ctypes:

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

Thomas




More information about the Python-list mailing list