-1

So I searched a little on the Internet and I found that the socket class can return the IPv4 address from the domain name in python. IP address of domain on shared host says how to do it.

Can I do exactly the same thing but return IPv6 address? It looks like support for IPv6 in Python is a bit limited and I found no resources searching on the Internet.

Community
  • 1
  • 1
Martin
  • 79
  • 3
  • 12

1 Answers1

-3

You can use this convert. Ipv4 to ipv6. IPv4 to IPv6

Krasimir
  • 1,806
  • 2
  • 18
  • 31
  • 1
    This has nothing to do with the question of resolving to IPv6 addresses – Sander Steffann Jul 21 '13 at 19:40
  • Why he can convert from ipv4 to ipv6 and will have the same result. – Krasimir Jul 22 '13 at 11:48
  • 2
    No, IPv4 and IPv6 are two different protocols. While you *can* write down IPv4 addresses in IPv6 notation (so that you can write software fully in IPv6 but can still talk to IPv4 systems) that is not what he is after. He wants the *real* IPv6 address of a system, not the IPv4 address in a different notation... – Sander Steffann Jul 22 '13 at 21:31