Skip to content

Instantly share code, notes, and snippets.

View reclosedev's full-sized avatar

Roman Haritonov reclosedev

  • Russia, Nizhny Novgorod
View GitHub Profile
@reclosedev
reclosedev / lockfile.py
Created June 30, 2012 21:28 — forked from ionrock/lockfile.py
A file locking example
"""
A file lock implementation that tries to avoid platform specific
issues. It is inspired by a whole bunch of different implementations
listed below.
- https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py
- http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup
- http://stackoverflow.com/questions/489861/locking-a-file-in-python
- http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/
- http://packages.python.org/lockfile/lockfile.html