Best way to embed Python in a C++ app?

Roy Smith roy at
Sun Mar 30 03:34:12 CEST 2003

I'm toying with the idea of embedding Python in an existing C++ 
application.  As far as I can tell, there are three possible paths I 
could take.  There's the raw API, there's SWIG, and there's boost.python.

I've played with the first two a little over the years, but don't really 
know anything about boost beyond what little I've learned from reading 
the boost web site.  It looks like I'm going to need to pass objects 
back and forth from C++ to Python, and (at least on the surface) boost 
looks like it can handle a lot of the messy details of this.  On the 
other hand, I'm a little worried that it's still a bit of a work in 

Anybody with experience in all three willing to offer a comparitive 

Also, are there any alternatives that I've missed?

More information about the Python-list mailing list