I'd be much happier if there was a standard API in tempfile.py that
did that for you, so you wouldn't have to understand fdopen(). (Your
example is wrong BTW, the open mode would have to be something like
'rb+' or 'wb+'.)

On Mon, Apr 28, 2008 at 4:35 PM,  <[EMAIL PROTECTED]> wrote:
>
>     Guido> IMO mkstemp() is a major pain because you have to use raw file
>     Guido> descriptors on the return value. I'd much rather recommend
>     Guido> [Named]TemporaryFile which return streams.
>
>  Why not:
>
>     fd, fname = tempfile.mkstemp()
>     f = os.fdopen(fd)
>
>  Seems fairly straightforward to me.
>
>  Skip
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to