Calling python modules from C++ code

Hey everyone.

I'm working on a side project where I want to have a main program that's written in C++. But I want the program to be expandable with modules that are small python scripts.

Ultimately I want to be able to both have my C++ code call into Python, and vice versa.

I've briefly looked at boost::python and the Python C/API. And while they seem to be solutions for either one of those, they do not seem to do both.

Can this be done in a way which is reasonable for a small-scale program?

Is Python not the best scripting language for this? Should I look at something else (like maybe Lua)? I'm open to suggestions.

Thanks.


EDIT:


Now that I look at Lua... it actually seems to be designed for exactly this. So I'm going to abandon Python and stick with Lua for this project.

Nevermind everyone!
Last edited on
Topic archived. No new replies allowed.