[Q]:Generate Unique ID's

achrist at easystreet.com achrist at easystreet.com
Fri May 23 16:29:08 EDT 2003


I'd like to generate unique identifiers for database items,
sort of like the ID's that MS uses for COM.  My purpose is 
to have unique ID's (across multiple [distributed] installations of
a program), so that databases can be combined, copied, carried off,
re-acquinted, compared, re-synchronized, etc, with some prayer
of not being totally munged.

Is there anything in the standard Python libs to generate an ID
like those that Windows uses, which are guaranteed to be unique
over all instances of everything, forever, no exceptions?  How 
about an easy call to Windows (if I don't care about cross-platform)
to have it generate one for me?  As this might happen every time
a user presses enter, maybe even several times on some updates, 
it would be nice if it never took more than (e.g.) 0.1 secs or so.


Al




More information about the Python-list mailing list