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

Tim Peters tim.peters at gmail.com
Fri Jul 28 06:27:51 CEST 2006


[Tim]
> ... uuid.getnode() tries things in this order on Windows:
>
>         getters = [_windll_getnode, _netbios_getnode, _ipconfig_getnode]
>
> It's only the first one that returns the bogus 0x00038a000015; both of
> the latter return 0x001111B2B7BF [the correct MAC address for my
> network card].

That was on my desktop XP Pro SP2 box.  On my similar laptop box, it's
quite different:  _windll_getnode and _ipconfig_getnode return the MAC
address of my wireless Ethernet adapter, while _netbios_getnode
returns the MAC address of my LAN Ethernet card.

> However, there's nothing I can do to that list to make test_uuid pass
> on this box.  It wants to insist that all three ways of
> getting/guessing the MAC address return the same thing, and that's
> never going to happen here.

Or on my laptop, but for different reasons there.

> Given that _windll_getnode's actual behavior appears to have nothing
> in common with what was expected for it here, best suggestion I can
> make is to throw its code away.

Which wouldn't improve things on my laptop.  Best next ;-) suggestion
is to change test_uuid to stop believing that uuid.py knows multiple
ways to find a well-defined MAC address.  I'm going to make that
change -- someone who hates that can revert it after they buy me two
new computers that work they way they think computers should work ;-)


More information about the Python-Dev mailing list