win32api module
kill function for Win32
def kill(pid):# w w w .ja v a 2 s. co m
"""kill function for Win32"""
import win32api
handle = win32api.OpenProcess(1, 0, pid)
return (0 != win32api.TerminateProcess(handle, 0))
s = raw_input("Enter a command (exit to exit): ")
if s == "exit" :
exit()