build: Remove unused script/mkversion.sh
[Samba/gebeck_regimport.git] / lib / dnspython / examples / xfr.py
blobe67ab189273df79a47863e273530a0288e3c2e9d
1 #!/usr/bin/env python
3 import dns.query
4 import dns.resolver
5 import dns.zone
7 soa_answer = dns.resolver.query('dnspython.org', 'SOA')
8 master_answer = dns.resolver.query(soa_answer[0].mname, 'A')
10 z = dns.zone.from_xfr(dns.query.xfr(master_answer[0].address, 'dnspython.org'))
11 names = z.nodes.keys()
12 names.sort()
13 for n in names:
14 print z[n].to_text(n)