I'd be more worried about two users writing to the file at the same time.  I don't have much experience in that area though so maybe someone could chime in on if that's a legitimate worry or not.

-Greg


On 11/24/05, Tim Golden <[EMAIL PROTECTED]> wrote:
[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
user
> 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,

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203

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

TJG

________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________
--
http://mail.python.org/mailman/listinfo/python-list



--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to