python - How to determine which executable from a list is running -


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 or process.terminate()

installation on windows - pip installation source (which means compiling), want download binary installation https://pypi.python.org/pypi/psutil/#downloads.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -