Thank you, Tim.

The portalocker code seems to prevent reading while the file is locked for 
writing, but it doesn't seem to prevent multiple writes (nor multiple 
exclusive locks, for that matter).

I guess it'd be better if I use the second suggestion, i.e. temporarily 
renaming the file for writing, and renaming it back to unlock it.

Cheers,
g



"Tim Golden" <[EMAIL PROTECTED]> schreef in bericht 
news:[EMAIL PROTECTED]

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


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to