For similar purposes I have used psutil library. Some hints:
- list processes with
psutil.pids()
(reference) - inspect process information with
process = psutil.Process(pid)
(reference) - do
process.kill
orprocess.terminate()
Installation on windows - pip
will do installation from the source (which means compiling), so you probably want to download binary installation from https://pypi.python.org/pypi/psutil/#downloads.