[Python-Dev] UUID module

Ka-Ping Yee python-dev at zesty.ca
Sat Jun 10 17:38:40 CEST 2006


On Sat, 10 Jun 2006, Thomas Heller wrote:
> I have not tested the speed, but extending my snippet to also work
> on 98 should be nearly trivial:
>
> try:
>     _func = windll.rpcrt4.UuidCreateSequential
> except AttributeError:
>     _func = windll.rpcrt4.UuidCreate
>
> def CreateGuid():
>     uuid = UUID()
>     if 0 == _func(byref(uuid)):
>         return str(buffer(uuid))

Okay.  Thanks for this.  I'll give it a shot.


-- ?!ng


More information about the Python-Dev mailing list