Answers for "how to check a program is running python"

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 is program running

import win32ui

def WindowExists(classname):
    try:
        win32ui.FindWindow(classname, None)
    except win32ui.error:
        return False
    else:
        return True

if WindowExists("DropboxTrayIcon"):
    print "Dropbox is running, sir."
else:
    print "Dropbox is running..... not."
Posted by: Guest on December-27-2021

Code answers related to "how to check a program is running python"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language