import ctypes
PROCESS_TERMINATE = 1
handle = ctypes.windll.kernel32.OpenProcess(PROCESS_TERMINATE, False,
    theprocess.pid)
ctypes.windll.kernel32.TerminateProcess(handle, -1)
In Python 2.5, how do I kill a subprocess?