Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created October 11, 2016 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurozumi/10bb98bd14ccf3c9a2d57ac686a3622d to your computer and use it in GitHub Desktop.
Save kurozumi/10bb98bd14ccf3c9a2d57ac686a3622d to your computer and use it in GitHub Desktop.
【Python】Pythonで指定したpidのプロセスが存在するかチェック
import psutil
pid = "pidを指定"
if psutil.pid_exists(pid):
print("{}は存在します。".format(pid))
else:
print("{}は存在しません。".format(pid))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment