How can one open a file for exclusive access?

Syver Enstad syver-en+usenet at online.no
Mon Jan 14 12:24:59 EST 2002


"Parzival Herzog" <parz at shaw.SpamBucket.ca> writes:

> I am using Python 2.1 under Windows 2000.
> 
> I want to be able to open a file for writing exclusively,
> that while it is open, no other process may read or
> write to that file.

You'll have to use functionality in the the excellent win32 extensions
that Mark Hammond provides. If you don't already have these download
them at once.

Check out the win32file module. It also helps to have the MSDN library in
reach so that you can look up what the functions really do.

-- 

Vennlig hilsen 

Syver Enstad



More information about the Python-list mailing list