HEX
Server: Apache
System: Linux server.instantlogomakers.com 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: s2spw (1156)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/share/doc/python3-dns/examples/name.py
#!/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', '']