Sign in to follow this  
ChaosEngine

break embedded python interpreter

Recommended Posts

I've got an mfc that both extends and embeds python. Basically the user can run a python script from inside that app that usses various C++ objects in the app (exposed through the damn-that's-cool Boost.Python library). The python script actually runs in a seperate thread within the app. My problem is that I want a way for the user to stop the script execution. So far nothing I've found on the web works (i.e. PyErr_SetInterrupt()). Anyone have any ideas?

Share this post


Link to post
Share on other sites
Define "stop script execution". That could mean suspend the thread until something else triggers it; bring down the entire python interpreter; yield control from the current executing script and so on.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Define "stop script execution". That could mean suspend the thread until something else triggers it; bring down the entire python interpreter; yield control from the current executing script and so on.


sorry should've been clearer, I want to terminate the interpreter without killing the application it's embedded in.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this