Using C to execute Python
phd at emerald.netskate.ru
Wed Jun 23 12:47:28 CEST 1999
On Wed, 23 Jun 1999, Thomas RЬberg wrote:
> I have a C program and I want to call certain Python methods / functions
> passing quite a few parameters.
> How can I do this, in general fashion?
You need to embed python interpreter into your program. That is: you
link your program with libpython.a and call some functions (initilize, evel
More details in the standard docs on Extending and Embedding Python.
> I would have to include python.h, I reckon - where can I find this, I've
> been searching all over for it (is it just me???)
It is in the source distribution.
> I'm no expert, far from, in Python...
> email: thomar at ifi.ntnu.no
Oleg Broytmann Netskate/Inter.Net.Ru phd at emerald.netskate.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list