From 7d86257d54cb59d016a051b91bdee62ab2f8a0d5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 5 Mar 2010 11:45:40 +1100 Subject: s4-python: import a copy of the python dns library This library is not installed on enough systems for us to rely on it being available. We use the system copy if possible, and fallback to this local copy Pair-Programmed-With: Andrew Bartlett --- .../scripting/python/samba_external/dnspython/examples/xfr.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 source4/scripting/python/samba_external/dnspython/examples/xfr.py (limited to 'source4/scripting/python/samba_external/dnspython/examples/xfr.py') diff --git a/source4/scripting/python/samba_external/dnspython/examples/xfr.py b/source4/scripting/python/samba_external/dnspython/examples/xfr.py new file mode 100755 index 0000000000..5cd6f55c06 --- /dev/null +++ b/source4/scripting/python/samba_external/dnspython/examples/xfr.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +import dns.query +import dns.zone + +z = dns.zone.from_xfr(dns.query.xfr('204.152.189.147', 'dnspython.org')) +names = z.nodes.keys() +names.sort() +for n in names: + print z[n].to_text(n) -- cgit