[Tutor] tempfile

Marilyn Davis marilyn at deliberate.com
Thu Dec 23 23:17:12 CET 2004


Hello Python Tutors,

I'm using tempfile.  The doc says it is opened 'w+b' so that it can be
read and written without closing and reopening.

But, for the life of me, I can't find any way to rewind it so I can
read what I wrote.

tempfile.mkstemp gives me the file descriptor.  Is there a way to make
a file object from a file descriptor?

Or, is there something in os or fcntl that allows me to rewind from a
file descriptor?

Thank you for any help you can give.

Marilyn Davis



More information about the Tutor mailing list