Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33459

Re: Subprocess puzzle and two questions

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!reader03.nrc01.news.zen.net.uk.POSTED!not-for-mail
From Nobody <nobody@nowhere.com>
Subject Re: Subprocess puzzle and two questions
Date Sat, 17 Nov 2012 00:17:26 +0000
User-Agent Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)
Message-Id <pan.2012.11.17.00.17.25.286000@nowhere.com>
Newsgroups comp.lang.python
References <mailman.3664.1352867713.27098.python-list@python.org> <mailman.3666.1352873042.27098.python-list@python.org> <roy-F5C640.09225714112012@news.panix.com> <mailman.3684.1352904008.27098.python-list@python.org> <k80gd6$t0q$1@panix2.panix.com> <mailman.3700.1352930072.27098.python-list@python.org> <roy-BF8F05.20491814112012@news.panix.com> <pan.2012.11.15.22.54.09.449000@nowhere.com> <roy-17407F.20073815112012@news.panix.com>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Lines 22
Organization Zen Internet
NNTP-Posting-Host 26512efb.news.zen.co.uk
X-Trace DXC=H8Z0OIlo:nHQQiDcQ>AVEGf2FgniPJjgB=dR0\ckLKG@WeZ<[7LZNRFiR<?M\^NeJGM2Z^cWRFGAK\RY3MJ7JTVH
X-Complaints-To abuse@zen.co.uk
Xref csiph.com comp.lang.python:33459

Show key headers only | View raw


On Thu, 15 Nov 2012 20:07:38 -0500, Roy Smith wrote:

>>> gethostbyname() and getaddrinfo() use the NSS (name-service switch)
>> mechanism, which is configured via /etc/nsswitch.conf. Depending upon
>> configuration, hostnames can be looked up via a plain text file
>> (/etc/hosts), Berkeley DB files, DNS, NIS, NIS+, LDAP, WINS, etc.
> 
> Gethostbyname() long predates NSS.

Before NSS there was host.conf, which provided similar functionality
except that the set of mechanisms was fixed (they were built into libc
rather than being dynamically-loaded libraries) and it only applied to
hostnames (NSS is also used for getpwent(), getprotoent(), etc).

> For that matter, I think it even predates DNS (i.e. back to the days
> when /etc/hosts was the *only* way to look up a hostname).
> 
> But, that's a nit.

Indeed; the main point is that gethostbyname() has never been specific to
DNS.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Subprocess puzzle and two questions wrw@mac.com - 2012-11-13 22:34 -0500
  Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-13 23:41 -0500
    Re: Subprocess puzzle and two questions William Ray Wing <wrw@mac.com> - 2012-11-14 00:03 -0500
      Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 09:22 -0500
        Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 01:40 +1100
          Re: Subprocess puzzle and two questions roy@panix.com (Roy Smith) - 2012-11-14 11:20 -0500
            Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 08:54 +1100
              Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 20:49 -0500
                Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 13:04 +1100
                Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-14 21:10 -0500
                Re: Subprocess puzzle and two questions Chris Angelico <rosuav@gmail.com> - 2012-11-15 13:21 +1100
                Re: Subprocess puzzle and two questions Dave Angel <d@davea.name> - 2012-11-14 21:55 -0500
                Re: Subprocess puzzle and two questions Kushal Kumaran <kushal.kumaran+python@gmail.com> - 2012-11-15 10:23 +0530
                Re: Subprocess puzzle and two questions Nobody <nobody@nowhere.com> - 2012-11-15 22:54 +0000
                Re: Subprocess puzzle and two questions Roy Smith <roy@panix.com> - 2012-11-15 20:07 -0500
                Re: Subprocess puzzle and two questions Nobody <nobody@nowhere.com> - 2012-11-17 00:17 +0000
              DNS from Python (was Re: Subprocess puzzle and two questions) aahz@pythoncraft.com (Aahz) - 2012-11-14 21:42 -0800
        Re: Subprocess puzzle and two questions wrw@mac.com - 2012-11-14 09:37 -0500
  Re: Subprocess puzzle and two questions Tim Roberts <timr@probo.com> - 2012-11-13 23:17 -0800

csiph-web