On Mon, 19 Feb 2018 12:32:49 +0000, Rhodri James wrote: > 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.
It looks like libnl would do what I want but there is a problem. When finished, my program will be released in the form of a Debian (*.deb) package and used by, for the most part, 'average' Linux users. These are people that know their way around Linux but know nothing or very little about Python. Installing a package using pip by them is pretty much out of the question. The system's package manager must be able to handle the program's dependencies so third-party packages are out of the question. But thanks for the suggestion. -- <Wildman> GNU/Linux user #557453 "There are only 10 types of people in the world... those who understand Binary... and those who don't." -Spike -- https://mail.python.org/mailman/listinfo/python-list