Mohammed Smadi wrote:
> hi;
> I am trying to do some very basic socket programming and i get the
> following error. Any help will be appreciated:
>
> Code:
> import socket
> x = socket.gethostbyaddr("www.google.ca")
>
> return an error: socket.herror: (1, 'Unknown host')
You're using the wrong method.
>>> socket.gethostbyname("www.google.ca")
'66.102.9.147'
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
