Check if an app with the same name is running, supports parameters.
install
pip install appinstance
intention
In cronjobs to detect if a program with the same arguments is already running
install
pip install appinstance
usage
from appinstance import AppInstance, AppInstanceRunning
import time
try:
# use Appinstance context manager, "arg1" is a good place for commandline variables.
with AppInstance("arg1", True):
print "sleep for 2 sec"
time.sleep(2)
except AppInstanceRunning:
print "already running"
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
appinstance-17.tar.gz
(2.4 kB
view details)
File details
Details for the file appinstance-17.tar.gz.
File metadata
- Download URL: appinstance-17.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ebd041bdaad245142218670976d96c427256e8d00a8a2b05f9e66ccba7e090a
|
|
| MD5 |
31f06cf8c9d7dcfe331616aec79f40b7
|
|
| BLAKE2b-256 |
6f6d30d1b8d5ca07156605fdde87cb2d649b606672dee4acc018fb26d1414c1a
|