How can I do the following things in python:
- List all the IP interfaces on the current machine.
- Receive updates about changes in network interfaces (goes up, goes down, changes IP address).
Any python package available in Ubuntu Hardy will do.
How can I do the following things in python:
Any python package available in Ubuntu Hardy will do.
I think the best way to do this is via dbus-python.
The tutorial touches on network interfaces a little bit:
import dbus
bus = dbus.SystemBus()
proxy = bus.get_object('org.freedesktop.NetworkManager',
'/org/freedesktop/NetworkManager/Devices/eth0')
# proxy is a dbus.proxies.ProxyObject