On 9 Ago, 20:31, [EMAIL PROTECTED] wrote:
> On Aug 9, 11:21 am, billiejoex <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> > I would like to use tempfile module to generate files having unique
> > names excepting that I don't want them to be removed after closing.
> > Does it is possible?
>
> Looks like tempfile.mkstemp() will do what you want.
>
> '''Unlike TemporaryFile(), the user of mkstemp() is responsible for
> deleting the temporary file when done with it.'''
>
> ~Sean

Thank you, it seems good.
Just another question:

>>> fd, filename = tempfile.mkstemp()
>>> type(fd)
<type 'int'>

I would expect a file descriptor, not and integer.
How do I have to use it?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to