in TSA-demo/TSA_mecha/finalflow-mqtt-dev-local.py [0:0]
def processCheck():
# Ask user for the name of process
try:
# iterating through each instance of the process
PROCNAME = "ffplay"
for proc in psutil.process_iter():
#print('proc.name: ',proc.name())
# check whether the process name matches
if proc.name() == PROCNAME:
print("ffplay still running")
return True
else:
#print('ffplay not found')
pass
return False
except Exception as e:
print("Error Encountered while running script for processCheck: ",e)