The lockfile module has the same general intent, but is not subject to race conditions. In particular, line 29 of quicklock.py will succeed if two processes attempt to acquire a lock between the time that test runs and when the lock file is created.
I truly don't mean to harsh on your work. This morning, I needed something with this functionality, hit teh googles, and found your project. I appreciatively thank you for releasing your work here on GitHub! But I caution that it may have some surprises that the preexisting alternatives don't.