Calling Python from C++

Lyle Johnson ljohnson at resgen.com
Thu Oct 19 09:52:19 EDT 2000


Eric,

I'd advise you to start small and work your way up to the eventual goal you
described -- not that it will be very difficult to get to that point. Have
you at least succeeded in getting the simple embedding example described in
the Python documentation to work? If so, you're a lot of the way there.
Depending on the number of classes and functions that you planning to expose
to Python, you might also want to look at SWIG (http://swig.sourceforge.net)
to automatically generate a lot of the wrapper code that you'd normally need
to write by hand. If you're only going to make a few new functions available
to Python it's probably not worth the trouble of downloading, installing and
learning to use SWIG.

Hope this helps,

Lyle

"Someone" <where at there.com> wrote in message
news:8smo5k$1s at dispatch.concentric.net...
> I'm looking for more information and examples of calling (or embedding)
> Python from C++ in a Win98 app.
>
> I have been to the www.python.org site, read the tutorials, read the
> Extension/Embedding doc, read the Python/C API doc, read the FAQ and
looked
> over the referenced example in ../demo/embed.
>
> Is there more about embedding somewhere else?  I'm especially looking for
> examples of how others made large lists of C++ objects availble to be read
> from the embedded Python routines.
>
> Thanks in advance for any suggestions.
>
> Eric
>
>
>





More information about the Python-list mailing list