How to implement a file lock ??

ionel ionel.mc at gmail.com
Wed Feb 16 18:01:52 EST 2005


i'm having some problems...
Traceback (most recent call last):
 File "D:\_ROOT\pywww\opinia\test2.py", line 5, in ?
   portalocker.lock(log, portalocker.LOCK_EX)
 File "D:\_ROOT\pywww\opinia\portalocker.py", line 61, in lock
   win32file.LockFileEx(hfile, flags, 0, 0xffff0000, __overlapped)
OverflowError: long int too large to convert to int

any sugestions ?

- Hide quoted text -


On Tue, 15 Feb 2005 10:22:41 +0000, Alan Kennedy <alanmk at hotmail.com> wrote:
> [ionel]
> > is there a cross-platform library or module for file locking?
> > or at least a win32 implementation.
> >
> > i'm trying to get a lock on some file in a cgi script. ( i got my data
> > erased a few times :P )
>
> portalocker - Cross-platform (posix/nt) API for flock-style file locking.
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203
>
> HTH,
>
> --
> alan kennedy
> ------------------------------------------------------
> email alan:              http://xhaus.com/contact/alan
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list