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?
For linux, you can just use check_output of the hostname -I system command like so:
check_output
hostname -I
from subprocess import check_output check_output(['hostname', '-I'])