Extending and Embedding Python with Boost

Hi everyone,

I have successfully extended and embedded python in C++ using the boost libraries. However, it isn't doing what I want. I need python to be able to modify the state of my C++ program at runtime. My goal is to allow my program to load in (at run time) a python file from disk, execute it, and have it change the state of the program. I created a shared object library file that is a python module that acts as an interface to my C++ program. From within C++ I initialize the python interpreter, load in this shared object file, and then load in an external python script. The script runs fine, but as far as I can tell, it's not actually gaining access to the running instance of my program. Instead, it's as if it starts up a new process that runs my program just for the python interpreter. That is not what I want at all. I want to be able to change values of objects in my program as it runs from python. Is this possible? How do I do it?

Thanks!
Topic archived. No new replies allowed.