I wonder if there is a way to use python to resolve the host name, which is resolved only in ipv6 and / or for the host name, which resolves both in ipv4 and ipv6?
socket.gethostbyname() and socket.gethostbyname_ex() do not work for ipv6 resolution.
The fake way to do this is to run a real linux host command and analyze the results. Is there a better way to do this?
Thanks,
source share