need unique filename
Pete Shinners
shredwheat at attbi.com
Mon May 6 23:21:49 EDT 2002
Marcus Schopen wrote:
> is there a possibility to create unique filenames to avoid problems if
> two files are created at the same time.
import tempfile
tempfilename = tempfile.mktemp()
read more about it online, you can also pass an optional suffix to the
call. there are other function to help deal with temp files.
http://www.python.org/doc/current/lib/module-tempfile.html
More information about the Python-list
mailing list