look here for a windows solution or google it
import os
import signal
def kill_process(processname):
for line in os.popen("ps xa"):
fields = line.split()
pid = fields[0]
process = fields[4]
print process
if process == processname:
os.kill(int(pid), signal.SIGKILL)
break
else:
pass
No comments:
Post a Comment