My Problem is, that I want to catch system events in a python script. If a cable is plugged into the network device and the computer connects to this network, i want to handle this event, starting a function (Because in this moment the default gateway is changing, and i need to recognize this). Is there a module doing this?
i need something like:
if class.network_connect_event():
do some stuff
This event handling has to work with windows and Unix system.
Thanks
Edit:
What i really need is some way to identify an usb network device. Its important for me to identify it when plugged in, and get its ip adress.