httplib does not use "hosts" file (Windows)

Gilles Lenfant glenfant at nospam-e-pack.net
Tue Sep 12 15:41:31 EDT 2000


Tim,

Yes but... I connect this Linux box from any Windows networks application
(ODBC connections, HTTP, FTP, Telnet...) using the *name* (written in the
'hosts' file) of this Linux box as well as using its IP address. It works in
javascript scripting too.

Why not Python ??? Doesnt it look for address resolution by the usual
windows services ?

It's something usual in Unix too (writing IP/names pairs in /etc/hosts file)
to speed up connections (no DNS/NIS transaction). In a symmetrical way, I
use Windows servers from the Linux box with whatever network application
using the name that's in the hosts file. I did not test with Python to see
if the problem is symmetrical to the Windows one.

So, in my humble opinion it is a bug ! (sorry)

I won't make a local DNS server for only two Linux boxes in the LAN.

Gilles Lenfant

"Tim Roberts" <timr at probo.com> a écrit dans le message news:
l0frrskmcsshd7jrq561pd897c65u3ka16 at 4ax.com...
> "Gilles Lenfant" <glenfant at nospam-e-pack.net> wrote:
>
> >Hi,
> >
> >Is it a bug or a feature of httplib
> >
> >I'm running Python 1.5.2 on Windows
> >There is an Apache/Linux intranet server in my LAN which IP addr/name is
in
> >"\winnt\system32\services\hosts" file (as usual when mixing Linux and
> >Windows in a LAN).
>
> This is not an all "usual" when mixing Linux and Windows.  We have an NT
> server doing DHCP and our internal DNS serving, because of the WINS
> support, and it's just a matter of reserving a few IP addresses in DHCP
for
> the Linux boxes and adding some DNS records.  You shouldn't have to use a
> hosts file for this.
>
> By the way, isn't the path \winnt\system32\drivers\etc\hosts?
> --
> - Tim Roberts, timr at probo.com
>   Providenza & Boekelheide, Inc.





More information about the Python-list mailing list