Any c header parser for generate ctypes module?

Diez B. Roggisch deets at nospam.web.de
Mon Mar 9 10:14:19 EDT 2009


Victor Lin wrote:

> Hi,
> 
> I am writing python binding for some c library. It is really a super
> boring job. Copy... paste... modify.. copy paste...modify.... I am
> wondering, I am a programmer, why I can't do this job like a
> programmer? So I think the best way to write binding for those c
> libraries, is to write a parser that parse header of c library and
> generate ctypes python module automatically. My question is, is there
> any available tools can achieve this? If not, what tool can I use to
> such a job easily. I need a c parser, is there any C parser written in
> python?

GCCXML is usually used to create ctypes-structures from headers.

Diez



More information about the Python-list mailing list