[Python-ideas] Cross-platform file locking, PID files, and the “daemon” PEP (was: Draft PEP: Standard daemon process library)

Ben Finney ben+python at benfinney.id.au
Fri Jan 30 04:44:39 CET 2009

"Stephen J. Turnbull" writes:

> If [the daemon interface deals with file locking] only because
> there's no satisfactory module implementing it widely available,
> then that could be done in a subsidiary module that handles
> OS-specific details, and optionally exposes OS-specific special
> features (a la os and os.posix). That would also make refactoring
> (close to) trivial when such a module did become widely available.

Skip Montanaro has a PyPI package, ‘lockfile’ (currently marked
“Beta”) <URL:http://pypi.python.org/pypi/lockfile> that has such

I think the interface he proposes is elegant and I intend to submit an
additional “PID File lock” capability, to cover the behaviour
expected of PID files in particular.

How should I alter this PEP if I'm proposing to use functionality
currently present in another package that exists only in PyPI?

Should I make an even lower-level PEP to suggest inclusion of Skip's
‘lockfile’ package? Is that wise? Is it polite?

 \          “Are you pondering what I'm pondering?” “Well, I think so, |
  `\    Brain, but if Jimmy cracks corn, and no one cares, why does he |
_o__)                           keep doing it?” —_Pinky and The Brain_ |
Ben Finney

More information about the Python-ideas mailing list