[Python-Dev] os.unlink() closes file?

Neal Becker ndbecker2 at gmail.com
Fri Sep 29 15:18:17 CEST 2006

Ronald Oussoren wrote:

> On Friday, September 29, 2006, at 02:22PM, Neal Becker
> <ndbecker2 at gmail.com> wrote:
>>It seems (I haven't looked at source) that os.unlink() will close the
>>If so, please make this optional.  It breaks the unix idiom for making a
>>temporary file.
>>(Yes, I know there is a tempfile module, but I need some behavior it
>>doesn't implement so I want to do it myself).
> On what platform? Do you have a script that demonstrates your problem? If
> yes, please file a bug in the bugtracker at
> http://www.sf.net/projects/python.
> AFAIK os.unlink doesn't close files, and I cannot reproduce this problem
> (python2.3 on Solaris 9).
Sorry, my mistake.

More information about the Python-Dev mailing list