[Python-Dev] Warn about mktemp once again?

skip at pobox.com skip at pobox.com
Tue Apr 29 04:12:21 CEST 2008

    Guido> I'd be much happier if there was a standard API in tempfile.py
    Guido> that did that for you, so you wouldn't have to understand
    Guido> fdopen().

That can be arranged:


    Guido> (Your example is wrong BTW, the open mode would have to be
    Guido> something like 'rb+' or 'wb+'.)

I'm not disagreeing with you, but it seems odd that os.fdopen doesn't simply
obey the mode of the file descriptor it receives as its argument (e.g.,
normally opened with "w+b").


More information about the Python-Dev mailing list