tags:

views:

324

answers:

2

How do I get the DNS records for a zone in python? I'm looking for data similar to the output of dig.

+3  A: 

Try the dnspython library:

You can see some examples here:

ars
Yes, good library but do not forget there are others. such as http://pydns.sourceforge.net/
bortzmeyer
+1  A: 

Your other option is pydns but the last release is as of 2008 so dnspython is probably a better bet (I only mention this in case dnspython doesn't float your boat).

Kurt