Created
April 6, 2018 07:02
-
-
Save EnriqueSoria/c91472e18791d67cd998ffefd3b7e993 to your computer and use it in GitHub Desktop.
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
import psutil | |
def check_process_running(processname, ending='.exe'): | |
process_list = [psutil.Process(pid).name() for pid in psutil.pids()] | |
return '{name}.exe'.format(name=processname) in process_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment