[Python-bugs-list] Re: popen2 and socket. (PR#53)
tm@funcom.com
tm@funcom.com
Mon, 16 Aug 1999 13:17:42 -0400 (EDT)
[Guido van Rossum]
>> [Guido van Rossum]
>> > This is not a Python bug.
>> > Your network environment has not been set up properly.
>>
>> Yes it is. The machine is connected to the internet. Everything else,
>> including Apache and Perl are able to use the network.
>>
>> I forgot to mention that Python 1.5.1 works with no problems.
> The specific problem is with the DNS. The failing line in
> test_socket.py checks that the DNS lookup for the result of
> gethostname() succeeds. In your case, it fails. There are tons of
> possible reasons why it would fail: perhaps gethostname() returns a
> host without a domain, or perhaps your hostname isn't registered in
> your DNS. You may be able to fix it by editing /etc/hosts.
Something else is going on, I built python 1.5.1 and 1.5.2 on the
exact same machine with exact same configure statements:
Python 1.5.2 (#9, Aug 16 1999, 19:08:25) [GCC egcs-2.91.66 19990314 (egcs-1.1.2 on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import socket
>>> socket.gethostbyname("cnn.com")
Traceback (innermost last):
File "<stdin>", line 1, in ?
socket.error: host not found
>>>
Python 1.5.1 (#4, Aug 16 1999, 18:15:50) [GCC egcs-2.91.66 19990314 (e on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import socket
>>> socket.gethostbyname("cnn.com")
'207.25.71.12'
>>>
gethostbyname("localhost") gives the same result, works in 1.5.1, but
not in 1.5.2.
--
- Terje
tm@funcom.com