Eryk Sun added the comment: > By your explanation, it sounds like it would be better > to call unlink() before close().
Sorry, I was responding in general, because I thought you meant unlink would fail like it would for most open files on Windows, because the CRT normally doesn't open files with delete sharing. But I see what you meant now. Yes, the order needs to be reversed as unlink() and then close() for this to work. Doing the close first does raise a FileNotFoundError. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26385> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com