This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested on Mac OS X 10.6.6 and Ubuntu 10.10 with Python 2.6.6 | |
To try it out, open up a python shell and type: | |
>>> from lock import FileLock | |
>>> lock = FileLock("my_lock", dir="/var/tmp") | |
>>> lock.acquire() | |
Leave the first shell open, and open another python shell and type the same thing: | |
>>> from lock import FileLock | |
>>> lock = FileLock("my_lock", dir="/var/tmp") |