2011/9/14 r houtman <rl_houtman@yahoo.com>

My program is executing a python script using
  PythonInterpreter.execFile( String filename )

Since i'm running from a dialog and the script execution can be quite lengthy I need execution to be interrupt-able.
I can't find a way to generate the "Ctrl+C" type of interrupt from the java -side (or similar) ?
Does anyone know how to do it ?

Many thanks,

I suggest that you create a new thread where execfile will be called. Then, from the main script, you can call interrupt to stop the thread.

Another way may be to start a new Python process to run the exfile. I think this would be easier because interrupt does not kill the thread.

Pierre Thibault

Python Developer/Développeur Python
Montréal, QC
(514) 716-8350