def kill(pid): """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()