lockfile · PyPI
https://pypi.org/project/lockfile25.11.2015 · The lockfile package exports a LockFile class which provides a simple API for locking files. Unlike the Windows msvcrt.locking function, the fcntl.lockf and flock functions, and the deprecated posixfile module, the API is identical across both Unix (including Linux and Mac) and Windows platforms. The lock mechanism relies on the atomic nature ...
zc.lockfile · PyPI
https://pypi.org/project/zc.lockfile07.08.2019 · The ZODB lock_file module provides support for creating file system locks. These are locks that are implemented with lock files and OS-provided locking facilities. To create a lock, instantiate a LockFile object with a file name: >>> import zc.lockfile >>> lock = zc.lockfile.LockFile ('lock') If we try to lock the same name, we’ll get a lock ...