Mailing List Archive

portable file locking?
Is there a single file-locking mechanism that will work on NT and Unix? The
fcntl module doesn't seem to be in the NT distribution.

Thanks,
--
/\\\ Mincom | Martin Pool | martinp@mincom.com
// \\\ | Software Engineer | Phone: +61 7 3303-3333
\\ /// | Mincom Ltd. |
\/// | Teneriffe, Brisbane | Speaking for myself only
portable file locking? [ In reply to ]
>Is there a single file-locking mechanism that will work on NT and Unix? The
>fcntl module doesn't seem to be in the NT distribution.

I took a stab at this, extending posixfile to work for NT as well as Unix.
My module seems to work, but I have never tested it thoroughly.

ntposixfile.py at http://starship.python.net/~jjkunce/

--Jeff