Using TCP/IP

William Trenker wtrenker at hotmail.com
Tue Oct 7 09:33:09 EDT 2003


On Fri, 03 Oct 2003 03:33:57 +0000 (GMT)
Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote regarding Re: Using TCP/IP:

>         Interesting. Under Mandrake 8.2, the above returns an error:
>  
> >>> socket.gethostbyname_ex('')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> socket.herror: (4, 'No address associated with name')

I get the same error here.  But this works:

>>> socket.gethostbyname_ex(socket.gethostname())
('noodle.noodle.org', ['noodle'], ['127.0.0.1'])

Linux 2.4.19; libc.so.6 2.2.5; gcc 2.95.3
GNU ld version 2.13.90.0.4 20020814
GNU Make 3.80
pkg-config 0.14.0
Python 2.3 (#1, Jul 30 2003, 12:02:14) [GCC 2.95.3 20010315 (release)]

Bill





More information about the Python-list mailing list