Once you have the unique filename it can be used like any regular file. Note: By default the file will be deleted when it is
closed. However, if the delete parameter is False, the file is not
automatically deleted.

This is a valid choice, given that an UUID generator is extremely unlikely to produce a duplicate identifier (a file name, in this case):

Only after generating 1 billion UUIDs every second for the next 100 years, the probability of creating just one duplicate would be about 50%. The probability of one duplicate would be about 50% if every person on earth owns 600 million UUIDs.

Very nice.. I will consider using this too because the file has time info, which might be useful in the future.
–
zallarakMay 8 '12 at 15:26

3

In a multi-threaded environment, there's a possible race condition involved in the sequence 1. Test if file exists, 2. create file. If another process interrupts yours between steps 1 and 2, and creates the file, when your code resumes it will overwrite the other process' file.
–
Li-aung YipMay 8 '12 at 15:36