Reverse DNS lookup in Python
Question: If I have an IP address like 2001:4860:4860::8888

How can I get the fully qualified domain in the format foo.ip6.arpa ?

EDIT: Both the solutions so far give me google-public-dns-a.google.com - maybe
Reverse DNS was the wrong name. For this I'd expect the output to be something
like 8.8.8.8.0...etc.ip6.arpa


Answer: using dnspython.

    
    
    from dns import resolver,reversename
    addr=reversename.from_address("2001:4860:4860::8888")
    str(resolver.query(addr,"PTR")[0])
    

