Any idea of stopping the execution of PyRun_File()

BigHand heweiwei at gmail.com
Mon Jun 8 21:15:22 EDT 2009


Hi,All
   I have an embedded python application. which is  a MFC app with
Python interpreter embedded.

   In the App, I have a separate thread to execute a Python script
(using the PyRun_File), but if the user want to stop the executing
script, how should I do?

A possible way is terminate the thread of executing the scripts by
TerminateThread(). but TerminateThread() is unsafe and not
recommended.

guys, could you guide me on this?

B.R.
Harry




More information about the Python-list mailing list