/usr/share/doc/python3-dns/examples
#!/usr/bin/env python3 import dns.name n = dns.name.from_text("www.dnspython.org") o = dns.name.from_text("dnspython.org") print(n.is_subdomain(o)) # True print(n.is_superdomain(o)) # False print(n > o) # True rel = n.relativize(o) # rel is the relative name www n2 = rel + o print(n2 == n) # True print(n.labels) # ['www', 'dnspython', 'org', '']
.
Edit
..
Edit
async_dns.py
Edit
ddns.py
Edit
ddr.py
Edit
doh-json.py
Edit
doh.py
Edit
doq.py
Edit
e164.py
Edit
ecs.py
Edit
edns.py
Edit
edns_resolver.py
Edit
mx.py
Edit
name.py
Edit
query_specific.py
Edit
receive_notify.py
Edit
reverse.py
Edit
reverse_name.py
Edit
send_notify.py
Edit
wire_read_tcp.py
Edit
xfr.py
Edit
zonediff.py
Edit