This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dabrahams
Recipients dabrahams
Date 2012-03-10.02:14:06
SpamBayes Score 3.9336674e-06
Marked as misclassified No
Message-id <>
NamedTemporaryFile is too hard to use portably when you need to open the file by name after writing it.  To do that, you need to close the file first (on Windows), which means you have to pass delete=False, which in turn means that you get no help in cleaning up the actual file resource, which as you can see from the code in is devilishly hard to do correctly.  The fact that it's different on posix (you can open the file for reading by name without closing it first) makes this problem worse. What we really need for this use-case is a way to say, "delete on __del__ but not on close()."
Date User Action Args
2012-03-10 02:14:08dabrahamssetrecipients: + dabrahams
2012-03-10 02:14:08dabrahamssetmessageid: <>
2012-03-10 02:14:08dabrahamslinkissue14243 messages
2012-03-10 02:14:06dabrahamscreate