Python 2 to 3 Conversion

Rhodri James rhodri at kynesim.co.uk
Mon Feb 19 07:32:49 EST 2018


On 18/02/18 16:18, Wildman via Python-list wrote:
>> But that's only going to show one (uplink) address. If I needed to get
>> ALL addresses for ALL network adapters, I'd either look for a library,
>> and if one wasn't easily found, I'd shell out to the "ip" command and
>> parse its output.:)
>>
> I considered using the "ip" command but I prefer not to
> depend on external programs if I can get around it.  I
> know that might be considered silly but that's just me.

It's not silly at all, but for Linux networking it might be the best 
idea.  I believe in theory you are supposed to use libnl (in some 
suitable wrapping), but my experience with that is that it is badly 
documented and horrendously unreliable.

-- 
Rhodri James *-* Kynesim Ltd



More information about the Python-list mailing list