Instead of using a thread, you could see if you could use a second process. For instance, the following would work on windows (and is killable).
import subprocess import win32api class SpawnController(object): def __init__(self,cmd): self.cmdline = cmd def start(self): self.process = subprocess.Popen([self.cmdline]) def stop(self): win32api.TerminateProcess(int(self.process._handle), -1 --michael On Feb 19, 2008 4:53 PM, Tony Cappellini <[EMAIL PROTECTED]> wrote: > When I executing a program external to the main program in a thread, > and that thread hangs, can the thread be terminated? > How does one handle this situation? > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- Michael Langford Phone: 404-386-0495 Consulting: http://www.RowdyLabs.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor