Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP, a simple ctypes wrapper for Win32 named mutexes
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore, a simple ctypes wrapper for Win32 named mutexes

NamedMutex is a class for using Windows (Win32) named mutexes for system-wide locks. For example, we use these to lock system-wide log files that multiple processes can write to.

This has a similar API to threading.Lock, and can be used with Python's with statement.

For example:

with namedmutex.NamedMutex('get_dir_mutex'):
    latest_dir = get_latest_dir()
    os.rename(latest_dir, latest_dir + '-processing')

See the source code for more info!

Something went wrong with that request. Please try again.