summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba_external/dnspython/examples/reverse_name.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-05 11:45:40 +1100
committerAndrew Tridgell <tridge@samba.org>2010-03-05 11:54:36 +1100
commit7d86257d54cb59d016a051b91bdee62ab2f8a0d5 (patch)
treeca682263ae2dffeaf58134e47080078864df64d4 /source4/scripting/python/samba_external/dnspython/examples/reverse_name.py
parentf3ca7a4696cadbb74f41dd71ef9336445682d406 (diff)
downloadsamba-7d86257d54cb59d016a051b91bdee62ab2f8a0d5.tar.gz
samba-7d86257d54cb59d016a051b91bdee62ab2f8a0d5.tar.bz2
samba-7d86257d54cb59d016a051b91bdee62ab2f8a0d5.zip
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 <abartlet@samba.org>
Diffstat (limited to 'source4/scripting/python/samba_external/dnspython/examples/reverse_name.py')
-rwxr-xr-xsource4/scripting/python/samba_external/dnspython/examples/reverse_name.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/scripting/python/samba_external/dnspython/examples/reverse_name.py b/source4/scripting/python/samba_external/dnspython/examples/reverse_name.py
new file mode 100755
index 0000000000..351896b015
--- /dev/null
+++ b/source4/scripting/python/samba_external/dnspython/examples/reverse_name.py
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import dns.reversename
+n = dns.reversename.from_address("127.0.0.1")
+print n
+print dns.reversename.to_address(n)