You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
220 B
9 lines
220 B
11 months ago
|
import socket
|
||
|
|
||
|
try:
|
||
|
host = 'www.amazon.es'
|
||
|
#host = socket.getfqdn()
|
||
|
#host = 'DESKTOP-KEFADT0'
|
||
|
print ("IP de %s: %s" %(host,socket.gethostbyname(host)))
|
||
|
except socket.error as msg:
|
||
|
print ("%s: %s" %(host, msg))
|