[issue14243] NamedTemporaryFile unusable under Windows

Nick Coghlan report at bugs.python.org
Sun Mar 11 04:45:34 CET 2012

Nick Coghlan <ncoghlan at gmail.com> added the comment:

Dave, decoupling the lifecycle of the created file from the object that created it is exactly what delete=False already covers. The complicated dance in NamedTemporaryFile is only to make *__del__* work  a bit more reliably during process shutdown (due to some messy internal problems with what CPython is doing at that point). If you're doing deterministic cleanup (even via atexit), you don't need any of that - you can just use os.unlink().


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list