summaryrefslogtreecommitdiff
path: root/contrib/python/examples/ldns-zone.py
blob: 266e6e5b4719be03cb935d0b78a5e2432203fb93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python
import ldns

#Read zone from file
zone = ldns.ldns_zone.new_frm_fp(open("zone.txt","r"), None, 0, ldns.LDNS_RR_CLASS_IN)
print zone

print "SOA:", zone.soa()
for r in zone.rrs().rrs():
   print "RR:", r


zone = ldns.ldns_zone()
#print zone