Perhaps you mean to use the function socket.gethostbyname instead.

>>> import socket
>>> socket.gethostbyaddr("www.google.ca")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
socket.herror: (1, 'Unknown host')
>>> socket.gethostbyname("www.google.ca")
'64.233.167.147'

Jeff

Attachment: pgpsZ1m3OcqVP.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to