Getting network interfaces in Python

Posted on Fri 30 December 2011 in Sysadmin • Tagged with linux, network interfaces, Python

Here’s a small Python script/module I put together to list all network interfaces on the current server (tested on Linux only!) in a format that easily lets me convert between name, index and address of an interface.

The code is based on getifaddrs.py from pydlnadms, but I ...


Continue reading