Richard Oudkerk added the comment: Sorry, I was not very clear.
If you use the O_TEMPORARY flag with open() to get a file handle, then the share mode used with the underlying CreateFile() function is X = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE whereas, if you don't use O_TEMPORARY then the share mode is Y = FILE_SHARE_READ | FILE_SHARE_WRITE While a handle is open with share mode X, you can only reopen the file if you also use share mode X. Therefore (using the msvcrt) you can only reopen it using O_TEMPORARY.* * sopen() does give some extra control over the share mode, but you still can't use it to get share mode X without also using O_TEMPORARY. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com