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
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to