socket.gethostbyaddr problem

Mohammed Smadi smadim2 at grads.ece.mcmaster.ca
Sat Sep 17 22:21:29 EDT 2005


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')

I tried replacing the web URL with an IP address on the net, on my LAN and 
it does not work.  It only works with "localhost" which is not very 
useful.  Am using Python 2.3.4 if that matters.

any direction will be great

moe smadi




More information about the Python-list mailing list