Any c header parser for generate ctypes module?

Discussion in 'Python' started by Victor Lin, Mar 9, 2009.

  1. Victor Lin

    Victor Lin Guest

    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.
     
    Victor Lin, Mar 9, 2009
    #1
    1. Advertising

  2. 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
     
    Diez B. Roggisch, Mar 9, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henk Punt
    Replies:
    0
    Views:
    409
    Henk Punt
    Jul 23, 2004
  2. Replies:
    0
    Views:
    514
  3. mlt
    Replies:
    2
    Views:
    880
    Jean-Marc Bourguet
    Jan 31, 2009
  4. Henrik
    Replies:
    1
    Views:
    442
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  5. Chris Angelico
    Replies:
    0
    Views:
    55
    Chris Angelico
    May 13, 2014
Loading...

Share This Page