Locking a file under Windows

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu Nov 24 16:10:14 CET 2005

[Guy Lateur]
> I'm working on an application that will be used by several users at
the same 
> time. The user should be able to both read and write to some data file

> stored on our file server. My question is: how can I prevent that one
> writes to the file while another user is reading it?

Might be worth looking in the Python Cookbook area. I seem
to remember several recipes to do this kind of thing
cross-platform. eg,


Also the pywin32 docs come with a flock-style example. Hope
one of the two can help you.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

More information about the Python-list mailing list