-1
I’m a long time doing research on this, and I wanted to know how to get the local ip (obviously) of my router in python in a Linux environment, I searched it in Google several times and always came with
hostname = socket.gethostname
ip = gethostbyname(hostname)
This here returns at 127.0.0.1 I definitely do not want this, actually what I seek is to save the router ip (here is 192.168.0.1) in a variable
I assume it was my mistake not to add this information, but I want to do it in a Linux environment
– Alyxson Marques
I think this answer might help you: https://stackoverflow.com/a/6556951/14100521
– Natan Fernandes