954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Execution Control for Embedded Python Interpreter

I would like to embed the python interpreter, but not in the way most other people do. I don't need to multi-thread unless it's necessary to do as follows... What I need is control over when execution happens. More specifically, I would like to use a python script to call some C++ functions that modify variables in my program, and I would like to PAUSE the python interpreter's execution whenever it finishes calling specific functions, and return execution to my C++ program. I would like to be able to resume execution in the python interpreter later, from the same place in the Python script.

Can anyone point me to some good resources? (The Python documentation doesn't mention anything specifically designed for execution control, but if there is something I could use, that would be great).

Maybe the Python API has some functions for setting the python interpreter globals and locals, so I can reset it to read from a specific line when execution returns?

Maybe there's something I can put in the Python script that returns execution to the C++ program?

soccermiles
Newbie Poster
4 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

SOLVED...How do you mark as solved?

soccermiles
Newbie Poster
4 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: