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