Answers for "python check if program is running"

4

how to check if an application is open in python

#Iterates through all the programs running in your system and checks for the one in the string
import psutil    
"someProgram" in (p.name() for p in psutil.process_iter())
Posted by: Guest on June-14-2020
1

how to check if a python script is running

# using Ubuntu
ps -aux | grep "python"  # will give you the list of python process running
Posted by: Guest on August-21-2021
0

python check if exe is running

import subprocess

s = subprocess.check_output('tasklist', shell=True)
if "cmd.exe" in s:
    print s
Posted by: Guest on August-07-2020

Code answers related to "python check if program is running"

Python Answers by Framework

Browse Popular Code Answers by Language