diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2012-07-04 14:22:28 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2012-07-04 14:22:28 +0000 |
commit | a1ba2d1ca3a1d6c9c36a79a196dd3ccb83ede353 (patch) | |
tree | ae20718827f0ca6f869c0f7bdb777816d3bf5f3a /contrib/python/examples/python3/ldns-zone.py |
Notes
Diffstat (limited to 'contrib/python/examples/python3/ldns-zone.py')
-rwxr-xr-x | contrib/python/examples/python3/ldns-zone.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/python/examples/python3/ldns-zone.py b/contrib/python/examples/python3/ldns-zone.py new file mode 100755 index 000000000000..b465eaa56bdb --- /dev/null +++ b/contrib/python/examples/python3/ldns-zone.py @@ -0,0 +1,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 + |