socket.gethostbyaddr problem

Mohammed Smadi smadim2 at
Sun Sep 18 04:21:29 CEST 2005

I am trying to do some very basic socket programming and i get the 
following error.  Any help will be appreciated:

import socket
x = socket.gethostbyaddr("")

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