Skip to content

Instantly share code, notes, and snippets.

@kurozumi
Created Oct 11, 2016
Embed
What would you like to do?
【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