Subprocess puzzle and two questions

Roy Smith roy at
Fri Nov 16 02:07:38 CET 2012

In article <pan.2012. at>,
 Nobody <nobody at> wrote:

> That's because the high-level routines aren't tied to DNS.

This is true.

>> 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.  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.

More information about the Python-list mailing list