[C++-sig] Is boost::python good for scripting?
Stefan Seefeld
seefeld at sympatico.ca
Mon Jan 7 14:26:47 CET 2008
Simon Pickles wrote:
> Hi,
>
> I have a c++ game engine. I also use a lot of python, mainly for my own
> tools and small apps.
>
> I'm hoping I can use Python as a scripting language in my c++ engine
> (which is already well developed).
>
> Looking at boost::python, its main emphasis seems to be on exposing c++
> to python. However, I am looking to do the reverse.
>
> Ideally, I'd like to be able to write small modules in Python,
> effectively functions loaded and run at call-time by the c++ engine, to
> which I could pass c++ data structures for processing.
>
> Could anyone give me a pointer to getting started using python in c++?
http://boost.org/libs/python/doc/tutorial/doc/html/python/embedding.html
You might also want to look into the test/exec.cpp and test/import_.cpp
files for inspiration that are part of the boost source package.
HTH,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list