python - How to determine which executable from a list is running -
this question has answer here:
i have path have many executables (around 800). need know if of executables running. because need run build , if executables running cannot recreate them (access error when linker invoked).
what run taskkill
(i on windows platform) on executables. takes time , i'd know if there's faster/better way.
the build scripts written in python other solutions welcome if can integrate them.
iulian
for similar purposes have used psutil library. hints:
- list processes
psutil.pids()
(reference) - inspect process information
process = psutil.process(pid)
(reference) - do
process.kill
orprocess.terminate()
installation on windows - pip
installation source (which means compiling), want download binary installation https://pypi.python.org/pypi/psutil/#downloads.
Comments
Post a Comment