Order of addresses returned by socket.gethostbyname_ex()

Tomas Lidén tomas.liden.privat at gmail.com
Mon Aug 22 07:32:48 EDT 2011


On 22 Aug, 12:36, Chris Angelico <ros... at gmail.com> wrote:
>
> Explicit is better than implicit. Instead of using the order, have a
> config file that chooses the one(s) you want by name or IP address. Of
> course, if you're on Unix/Linux, you can use the interface name (eth0,
> eth1, etc) with a fair degree of reliability.
>

The config file solution is not suitable, I think. This code should
run in a general cross platform application (Texttest), and we do not
want each user of that system to be forced to edit a config file..

/Tomas



More information about the Python-list mailing list