[Python-Dev] Ctypes and the stdlib (was Re: LZMA compression support in 3.3)

Simon Cross hodgestar+pythondev at gmail.com
Sun Aug 28 13:40:43 CEST 2011


On Sun, Aug 28, 2011 at 6:58 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> 2) It is not trivial to use it correctly. I think it needs a SWIG-like
> companion script that can write at least first-pass ctypes code from the .h
> header files. Or maybe it could/should use header info at runtime (with the
> .h bundled with a module).

This is sort of already available:

-- http://starship.python.net/crew/theller/ctypes/old/codegen.html
-- http://svn.python.org/projects/ctypes/trunk/ctypeslib/

It just appears to have never made it into CPython. I've used it
successfully on a small project.

Schiavo
Simon


More information about the Python-Dev mailing list