Created
August 16, 2019 09:38
-
-
Save jeroendelfos/0add1e54d882aff75acd99d2b604d2f4 to your computer and use it in GitHub Desktop.
Check if a program is running on your OS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def program_running(program_name): | |
prgrm = [p.name() for p in psutil.process_iter() if p.name() == program_name] | |
prgrm_is_running = len(r)>0 | |
return prgrm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment