How to kill python thread

hi,
I just developed one application. The front end is in wxpython and back end is python script. The script is calculating some ascii file and generating it into the jpeg image. The script is depends on the input given. So the script might last for 1 hours also. My program has two separate thread one for GUI and another for python script. My gui is initiating the python script . It is going well. But there is button on GUI that stops the backend script. Whenever i press this stop button my script is not stopping. And i have to restart the whole program. I dont know how to kill the python thread from the button.

So can any body tell me how to kill the python thread programmatically?
Thanks in advance,
Naish

Hi Naish,

ยทยทยท

On Dec 3, 2007 11:50 PM, Naishadh shroff. wrote:

hi,
I just developed one application. The front end is in wxpython and back end
is python script. The script is calculating some ascii file and generating
it into the jpeg image. The script is depends on the input given. So the
script might last for 1 hours also. My program has two separate thread one
for GUI and another for python script. My gui is initiating the python
script . It is going well. But there is button on GUI that stops the backend
script. Whenever i press this stop button my script is not stopping. And i
have to restart the whole program. I dont know how to kill the python thread
from the button.
So can any body tell me how to kill the python thread programmatically?

You might try to borrow some idea from this Wiki page:

http://wiki.wxpython.org/LongRunningTasks

HTH.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/