How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?
On Debian (tested) and I suspect most Linux's..
import commands RetMyIP = commands.getoutput("hostname -I")
On MS Windows (tested)
import socket socket.gethostbyname(socket.gethostname())