[C++-sig] Boost.Python embedded examples?

David Abrahams dave at boost-consulting.com
Thu May 5 04:24:55 CEST 2005


Hi Neb,

Neb Naic <niacneb at yahoo.com> writes:

> Hello,
>
> I've noticed there are no examples of embedded Python in the
> installation of Boost.Python.

There is one in libs/python/test/embedding.cpp.

> Why are the "getting started" examples only for extending Python?

No particular reason.  It wasn't a high priority for those people that
funded the work, I guess.

> Is Boost.Python not viable for embedding Python?  Should I use CXX
> or SWIG instead?

It is viable.

> Finally, the Boost.Python Web site builds up the extending case very
> well; but, the embedding aspects assume too much of a Python
> background (IMHO).  

I think you're right; support for embedding could be stronger.

> And, no complete example is given.
>
> I really hope to not have to use the Python/C++ API.  My application
> requires both extending and embedding.  Please help!

There are more than a few people on the C++-sig
(http://www.boost.org/more/mailing_lists.htm#cplussig) who have done
lots of embedding with Boost.Python.  I suggest you ask there.

[Actually, unless you want to pay Boost Consulting for support, you
really should post your Boost.Python questions there, regardless.  I
hope you can understand that -- since Boost support is part of my
business -- I can't really respond to personal email support requests
except under contract.]

HTH,
-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com



More information about the Cplusplus-sig mailing list