On python-dev Guido lamented the fact that tempfile.mkstemp() returns a file descriptor instead of a file object. This patch adds tempfile.mkstempf to remedy that.
Nick> What does this offer over using NamedTemporaryFile(delete=False)? Nothing I suppose. I wasn't aware of the similarity of the two (I always use mkstemp()) or the delete arg to NamedTemporaryFile, and assumed Guido's complaint about mkstemp's shortcoming indicated that the functionality he desired didn't exist. Skip
The delete flag on NamedTemporaryFile is new for 2.6, so it isn't surprising people aren't familiar with it. The other advantage of using NamedTemporaryFile is that its name attribute is set correctly, which isn't the case when using mkstemp directly.