get the IP address of a host

Kartic kartic.krishnamurthy at gmail.com
Wed Jan 5 11:08:54 EST 2005


socket.gethostbyaddr(socket.gethostname())

will return a tuple containing fully qualified hostname,  alternative
hostnames, ip addresses (>1 if multihomed).

Thanks,
--Kartic




More information about the Python-list mailing list