]>
git.saurik.com Git - apple/network_cmds.git/blob - unbound/libunbound/python/doc/examples/example7-2.py
5a41f8dc93338208665750c63e271cffef68d403
2 # vim:fileencoding=utf-8
4 # IDN (Internationalized Domain Name) lookup support (lookup for MX)
9 ctx
.resolvconf("/etc/resolv.conf")
11 status
, result
= ctx
.resolve(u
"háčkyčárky.cz", unbound
.RR_TYPE_MX
, unbound
.RR_CLASS_IN
)
12 if status
== 0 and result
.havedata
:
14 print " raw data:", result
.data
15 for k
in result
.data
.mx_list_idn
:
16 print " priority:%d address:%s" % k