[Q]:Generate Unique ID's

Paul Rubin http
Sat May 24 07:17:02 EDT 2003


marcus at infa.abo.fi (Marcus Alanen) writes:
> So, just import the file and successively call getUniqueID() to
> generate UUIDs.
> 
> import random
> import time
> import os

Under Linux, I think it's much better to just open /dev/urandom and
read some random bytes from it.

Under Windows, the stuff you've done may be about as good as you can
hope for in pure Python.




More information about the Python-list mailing list