finding IP address of computer

BartlebyScrivener rpdooling at gmail.com
Thu Apr 27 11:16:23 EDT 2006


One way:

>>> import socket
>>> socket.getaddrinfo(socket.gethostname(), None)[0][4][0]

It was the first google hit




More information about the Python-list mailing list