portalocker in Win98
rjones at ekit-inc.com
Thu Jan 16 00:16:01 CET 2003
On Thu, 16 Jan 2003 9:59 am, Richard Jones wrote:
> On Wed, 15 Jan 2003 7:37 pm, James Kew wrote:
> > Thomas Heller wrote:
> > > But even they may not be needed, there's the little known msvcrt
> > > module included in standard Python, which also has a locking function.
> > Again, this doesn't support blocking locks -- the docs say it polls for a
> > lock 10 times at 1-second intervals before giving up. It also has the
> > rather odd property of locking for a range of bytes in the file starting
> > from the current file position.
> The 10x 1-second rety is probably sufficient. I haven't seen the API, but
> that could probably be wrapped in a "while 1:", yes?
This thread on python-win32 looks like it might have the solution:
(since I want a blocking, exclusive lock :)
More information about the Python-list