[Python-Dev] how about adding ping's uuid module to the standard lib ? (original) (raw)

Paul Moore p.f.moore at gmail.com
Tue Mar 7 17:30:31 CET 2006


On 3/7/06, Phillip J. Eby <pje at telecommunity.com> wrote:

At 06:29 AM 3/7/2006 +0100, Fredrik Lundh wrote: >see subject and http://python.org/sf/1368955 > >comments ?

would be nice if you could just call UUID() to create a generic UUID in a platform-appropriate way. 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.:

Given that ctypes is going to be in Python 2.5, it might be reasonable to use it to access platform-specific APIs like this. It certainly makes some sense for Windows, where running an external process is slow, and the existence of suitable external utilities (and the format of their output!) is unreliable... (I haven't looked at the code, so I don't know if this applies to Ping's use of ipconfig).

Paul



More information about the Python-Dev mailing list