Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
import sockethostname = socket.gethostname()socket.gethostbyname(hostname)'172.17.0.3'[m for m in dir(socket) if "host" in m]['gethostbyaddr',
'gethostbyname',
'gethostbyname_ex',
'gethostname',
'sethostname']