Newbie for Embeding

Kevin Dahlhausen morse at harborcom.net
Tue Jun 15 07:45:34 EDT 1999


Denis Lamarche <brainwav at hotmail.com> wrote:

>I was wondering something.  If you can embed python into c++, can you
>then call your c++ fuctions from python?  Can you also modify variable
>in your c++ program using python?
>
>Denis Lamarche

You have to create a module that exposes those elements of your C++ program to
Python.  SWIG (Simplified Wrapper Interface Generator) automates this for simple
cases.   Once you have the module, the answer to both questions is yes.   See
the docs under extending and embedding python.






More information about the Python-list mailing list