uniqueness of temporary files generated by tempfile

Emile van Sebille emile at fenx.com
Fri Mar 6 19:27:25 EST 2009


Catherine Moroney wrote:
> Are the temporary filenames generated by the tempfile module
> guaranteed to be unique?

I suspect this answers your question...

Emile


 >>> import tempfile
 >>> help(tempfile)
Help on module tempfile:

NAME
     tempfile - Temporary files.

FILE
     c:\python25\lib\tempfile.py

DESCRIPTION
     This module provides generic, low- and high-level interfaces for
     creating temporary files and directories.  The interfaces listed
     as "safe" just below can be used without fear of race conditions.
     Those listed as "unsafe" cannot, and are provided for backward
     compatibility only.




More information about the Python-list mailing list