[python-win32] checking file permission on network share
Tim Golden
mail at timgolden.me.uk
Fri Sep 2 12:00:31 CEST 2011
On 02/09/2011 10:58, Tim Golden wrote:
> filename = r"c:\windows\system32\drivers\etc\hosts",
> win32file.CreateFile (
> ntsecuritycon.FILE_GENERIC_WRITE, 0, ## exclusive write
> None, win32con.OPEN_ALWAYS, 0, None
> )
Just noticed that my code is unnecessarily trying to get an
exclusive lock. You probably want SHARE-everything mode
otherwise you risk locking other users out of that file
however transiently.
TJG
More information about the python-win32
mailing list