Any c header parser for generate ctypes module?

V

Victor Lin

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?

Thanks.
Victor Lin.
 
D

Diez B. Roggisch

Victor said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top