On Apr 4, 2020, at 12:45, Pete Wicken <petewic...@gmail.com> wrote:
> 
> Agreed that this could be achieved by a third party library; and probably 
> already is

PS, I’ve needed something like this a few times in the past, so I can offer 
some vague memories of what’s available.

I’ve mostly used netifaces, which is amazing and does all the low-level stuff 
you’d want and is more cross-platform than you’d believe possible. But its API 
isn’t very ipaddress-like; it’s mostly dicts of strings and enum ints, and most 
of what it does isn’t relevant here.

There’s a library that I believe is called netaddr (and I think it’s the one 
with that name on PyPI), which took Google’s ipaddr and expanded it to add 
MAC/EUI and various other kinds of addresses. If the author is willing, and if 
it’s solid enough, I’d bet that stripping it down to just MAC and changing the 
API to parallel ipaddress instead of ipaddr would be a lot easier.

I’ve also used QtNetwork in a GUI app. That obviously isn’t as amenable to 
borrowing, but if there are any design questions that come up, looking at how 
Qt does it (and whether they have a billion bug reports/feature requests 
complaining about it) can be helpful.

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/2457LTHHJ7YBWY7DA5S5CVCZ7OPNWF32/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to