Limits the number of running instances of a Python script
Project description
Limits the number of running instances of a Python script
pip install lockexclusive
How to use it
import sys
from time import sleep
from lockexclusive import configure_lock
# it can be used like this:
# configure_lock(maxinstances=1, message="More than one instance running",file=sys.argv[0])
# or without the file argument:
configure_lock(maxinstances=1, message="More than one instance running")
sleep(100)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lockexclusive-0.10.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for lockexclusive-0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dc1ed2876bcb334a4b1774af9f4c0eb152ad98743ea66aaf5f42fee04351483 |
|
MD5 | dc0ae3d1c767b79c789b2ab6885c2cd1 |
|
BLAKE2b-256 | 409750f785605316fd288a1f99371314e8e6c40d511be4caef1614306aba458f |