dnspython will do my DNS lookups very nicely, but it entirely ignores the contents of /etc/hosts.
/etc/hosts
Is there a python library call which will do the right
list( map( lambda x: x[4][0], socket.getaddrinfo( \ 'www.example.com.',22,type=socket.SOCK_STREAM)))
gives you a list of the addresses for www.example.com. (ipv4 and ipv6)