Is there any easy way to have a system-wide mutex in Python on Linux? By "system-wide", I mean the mutex will be used by a group of Python processes; this is in contrast to a traditional mutex, which is used by a group of threads within the same process.
EDIT: I'm not sure Python's multiprocessing package is what I need. For example, I can execute the following in two different interpreters:
from multiprocessing import Lock
L = Lock()
L.acquire()
When I execute these commands simultaneously in two separate interpreters, I want one of them to hang. Instead, neither hangs; it appears they aren't acquiring the same mutex.