How to pass a Python List to C

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sandhya212
    New Member
    • Jul 2009
    • 1

    How to pass a Python List to C

    Hi,

    I am very new to Python and thus the question. I have a Python List ready now which I need to send to a C program for further processing.

    Is this possible? I came across SWIG which does a C to Python but could not find anything that did it the other way round.

    Please advice me as to what I need to search for/ go through in this regard.

    -Thank you,
    Sandhya
  • kudos
    Recognized Expert New Member
    • Jul 2006
    • 127

    #2
    I guess the "normal" way is to embedd a python interpreter in your C program (else, if this is a part of a batch-script thing, you could program a routine that would read the content of the list into the c-program)

    -kudos

    Comment

    Working...