tempfile behavior

half.italian at gmail.com half.italian at gmail.com
Thu Aug 9 14:31:31 EDT 2007


On Aug 9, 11:21 am, billiejoex <gnew... at gmail.com> 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




More information about the Python-list mailing list