-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathchk_process.py
More file actions
26 lines (24 loc) · 701 Bytes
/
chk_process.py
File metadata and controls
26 lines (24 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import psutil
def get_running(proc_name):
for p in psutil.process_iter():
#if p.status() == "running":
try:
name = p.name().lower()
if name == proc_name.lower():
return True
except:
continue
return False
def get_runnings(proc_names):
stats = [False, False]
for p in psutil.process_iter():
#if p.status() == "running":
try:
name = p.name().lower()
for i in proc_names:
name == proc_names[0].lower():
return True
except:
continue
return False
#print(get_running("GWSL_vcxsrv_LOWDPI.exe"))