Good examples for Embedding python in C, C++
Rick Ratzel
rick.ratzel at magma-da.com
Wed Apr 28 14:16:02 EDT 2004
I did a presentation on this very topic at PyCon this year:
http://elmer.sourceforge.net/PyCon04/elmer_pycon04.html
...and here is the complete example code:
http://elmer.sourceforge.net/PyCon04/Elmer_PyCon04.tgz
You can use Elmer (http://elmer.sourceforge.net) to automatically
generate the C equivalent to a Python API. When run in "frozen" mode,
the resulting application is self-contained...but when run in "warm"
mode, a user can modify the python sources without any code
recompilation, like you said.
-Rick Ratzel
Henko Gouws (H) wrote:
> Hallo
>
> I am looking for good examples on how to call a python script from C,
> C++ and pass parameters (list of strings) to the python script. The
> aim is to ultimately allow the end-user to modify the python script,
> without any code recompilation, to suit the needs of the end-user.
> The C, C++ part will remain intact.
>
> I could not find good examples, that could help me with this, in the
> references from python.org. I would appreciate your help.
>
> thanks
> Henko
>
More information about the Python-list
mailing list