Hi everybody, I wrote a python script to setup my network interface under Linux. To perform it, I use directly from my python script external programs as 'ifconfig' and 'route' ans I fill the file /etc/resolv.conf with the good nameserver IP. So, it it works and my network is up.
My problem is that when I use the function socket.gethostbyaddr just after setting up the network and without getting out of my script, I get an exception socket.herror. If I start my script again, now the function socket.gethostbyaddr works correctly. Python seems to load the network configuration at startup, and if network is not set at this moment, it does not reload changes. So, does someone know how to reload the network configuration directly from my script without restarting it ? Thanks by advance. HIL -- http://mail.python.org/mailman/listinfo/python-list