On 7 Aug 2012, at 11:50, Pankaj Rawat <[email protected]> wrote:

> Hi All,
>  
> Actually I am not able to findout how to query Authority section using DNS 
> python.
> Can anyone tell me how to do it?

This kind of question is better asked on dnspython-users.  The answer is to use 
the "authority" field of the message object, e.g.

#!/usr/bin/env python

import dns.resolver

answers = dns.resolver.query('dnspython.org', 'MX')
for rdata in answers:
    print 'Host', rdata.exchange, 'has preference', rdata.preference
print '; AUTHORITY'
for rrset in answers.response.authority:
    print rrset

/Bob

_______________________________________________
dnspython-dev mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo/dnspython-dev

Reply via email to