Just test: >>> socket.gethostbyname('www.google.com') '216.239.39.99' >>> socket.gethostbyaddr('216.239.39.99') Traceback (most recent call last): File "", line 1, in ? herror: (11004, 'host not found') Don't know why. Maybe of this strange akadns-stuff?!?! He struggles around for quite a time before he comes to the error, maybe to much or cyclic input. Cheers, Spikeee
Logged In: YES user_id=580910 This is not a bug/feature of the python socket module, but of DNS itself. DNS uses a seperate tree to find the name associated with an IP adres, there is no entry for the address associated with www.google.com. The same feature can be observed from the command-line: $ nslookup www.google.com ns.xs4all.nl Server: ns.xs4all.nl Address: 194.109.6.66#53 Non-authoritative answer: www.google.com canonical name = www.google.akadns.net. Name: www.google.akadns.net Address: 216.239.59.99 $ nslookup 216.239.59.99 ns.xs4all.nl Server: ns.xs4all.nl Address: 194.109.6.66#53 ** server can't find 99.59.239.216.in-addr.arpa: NXDOMAIN
Logged In: YES user_id=887415 Good answer. Since this is not a bug I suggest Gert or someone removes it from the bug list. Does anyone know of another forum for these kind of common non-bug questions? I could only think of posting to comp.lang.python/activestate's python-list for archival purpose. ...johahn
Logged In: YES user_id=31435 Closed as 3rd-party, won't fix, which is the closest thing we have to "it's not a bug, but it's not Python's doing even if it were" . Asking for a tutorial about anything on c.l.py will usually get a decent response (Python-related or not).