Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If you want to get the IP Handle in your Python software, then you are able to do the next:
socket.gethostname()
import socket
print(socket.gethostbyname(socket.gethostname()))
socket.getsockname()
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.join(("8.8.8.8", 80))
print(s.getsockname()[0])
netifaces
modulefrom netifaces import interfaces, ifaddresses, AF_INET
for ifaceName in interfaces():
addresses = [i['addr'] for i in ifaddresses(ifaceName).setdefault(AF_INET, [{'addr':'No IP addr'}] )]
print(' '.be a part of(addresses))