unique number generator

Daniel 'Dang' Griffith noemail at noemail4u.com
Wed May 19 09:06:50 EDT 2004


On Wed, 19 May 2004 18:36:40 +0800, "Joe Wong" <joewong at mango.cc>
wrote:

> I need to implement a unique number generator that 1 or more processes on same or different machines will make use of it. Is there any library / project available already for this?

Yes.  Google for GUID (globally unique identifier) algorithm or UUID
(universally unique algorithm):
"http://www.google.com/search?q=GUID+algorithm",
"http://www.google.com/search?q=UUID+algorithm".

If you need to use one, instead of implement one, and
you're running on Windows machines with Mark Hammond's
win32 extensions, you can do it easily:

import pywintypes
guid = pywintypes.CreateGuid()
have_a_nice_day(guid)

    --dang



More information about the Python-list mailing list