1 2 3 4
Pidfile featuring stale detection and file-locking, can also be used as context-manager or decorator WWW: http://pypi.python.org/pypi/pid