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

Ronald Oussoren ronaldoussoren at mac.com
Fri Sep 29 14:36:23 CEST 2006


 
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 file?
>
>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).

Ronald



More information about the Python-Dev mailing list