Kent Johnson a écrit : Hello,
> Try it like this, using os.fdopen() to convert the low-level file handle > from mkstemp() to a Python file object: > > In [21]: fd, fname = tempfile.mkstemp() > > In [22]: f = os.fdopen(fd, 'w') > > In [23]: f.write('foo') > > In [24]: f.close() > > In [25]: os.unlink(fname) > > Seems to work... Yes, indeed, it works. Not so easy for me to understand, though. I think I get it, more or less, with the help of the Python tempfile module documentation and the help of the Wikipedia article on file descriptors: http://en.wikipedia.org/wiki/File_descriptor Thank you. -- Yves Egrix _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor