[FRPythoneers] Cross-platform flock?

Sean Reifschneider jafo at tummy.com
Tue Aug 14 12:51:21 MDT 2001


On Tue, Aug 14, 2001 at 11:11:21AM -0600, Ken Kinder wrote:
>I see flocking support in Unix-specific modules, but does anyone know
>how to write software that'll lock properly in the inferior OS and
>Linux/Unix?

You might try my locking module at:

   ftp://ftp.tummy.com/pub/tummy/Python/jlock.py

It uses the "link()" operator to implement dot-locking, which might work on
Windows.  It relies on link() being atomic and that link() fails when the
target already exists.

Sean
-- 
 Follow your dreams.  Unless it's the one where you're at work in your
 underwear during a fire drill.
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the FRPythoneers mailing list