[Python-Dev] UUID module
Phillip J. Eby
pje at telecommunity.com
Sat Jun 10 17:50:09 CEST 2006
At 08:22 AM 6/10/2006 -0500, Ka-Ping Yee wrote:
>Finally, Phillip brought up PEAK:
> > PEAK's uuid module does this such that if win32all is present,
> > you get a Windows GUID, or if you have a FreeBSD 5+ or
> > NetBSD 2+ kernel you use the local platform uuidgen API. See e.g.:
>...so i looked at PEAK's getnodeid48() routine and borrowed the
>Win32 calls from there, with a comment giving attribution to PEAK.
There appears to be a transcription error, there; the second win32 import
isn't covered by a try/except and the ImportError seems to have disappeared
Also, for Python 2.5, these imports could probably be replaced with a
ctypes call, though I'm not experienced enough w/ctypes to figure out what
the call should be.
Similarly, for the _uuidgen module, you've not included the C source for
that module or the setup.py incantations to build it. But again, it could
probably be replaced by ctypes calls to uuidgen(2) on BSD-ish platforms.
I'll take a whack at addressing these once the code is in, though, unless
there's a ctypes guru or two available...?
More information about the Python-Dev