| DIR:/proc/self/root/proc/thread-self/root/usr/share/doc/python2-dns/examples/ |
| Current File : //proc/self/root/proc/thread-self/root/usr/share/doc/python2-dns/examples/mx.py |
#!/usr/bin/env python
from __future__ import print_function
import dns.resolver
answers = dns.resolver.query('nominum.com', 'MX')
for rdata in answers:
print('Host', rdata.exchange, 'has preference', rdata.preference)
|