generating uuids / guids
aahz at pythoncraft.com
Wed Aug 18 16:42:20 CEST 2004
In article <f57664b9.0408180524.721a3421 at posting.google.com>,
Jonathan P. <jbperez808 at yahoo.com> wrote:
>aahz at pythoncraft.com (Aahz) wrote in message news:<cf8nui$1uo$1 at panix1.panix.com>...
>> Sure it would. Best way to start is to create a stand-alone third-party
>> library that implements the full DCE spec. Once it has proven its
>> utility and stability, send a note to python-dev suggesting that it be
>> Keep in mind that UUID generation is a somewhat complex and tricky
>> business will likely require some kind of C library support (to get the
>> MAC address, to check if there's already a system-level UUID/GUID
>> generator present, to provide a "good" UUID if there's no network card,
>> and so on).
>Aren't there already uuid generation routines in both Linux and
>Windows and wouldn't all that's needed be to wrap them in Python?
Absolutely. However, I don't know if any of them are cross-platform,
and if you have any intention of getting this into the standard library,
it'll need to be readily available on any platform with an ANSI C
compiler. Packaging is *NOT* trivial, and that's precisely why it's
rare to see code added to the standard library until it has proven
If you can find a way to implement this in pure Python, that probably
gives the biggest boost to the likelihood of getting into the standard
library. Python 2.4 is too far along to add this; that gives you 12-18
months for working this into usable shape.
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"To me vi is Zen. To use vi is to practice zen. Every command is a
koan. Profound to the user, unintelligible to the uninitiated. You
discover truth everytime you use it." --reddy at lion.austin.ibm.com
More information about the Python-list