#NEWLINE# def revlookupall( name ) : #NEWLINE# #INDENT# 'convenience routine for doing a reverse lookup of an address' #NEWLINE# a = name . split ( '.' ) #NEWLINE# a . reverse ( ) #NEWLINE# b = ( '.' . join ( a ) + '.in-addr.arpa' ) #NEWLINE# names = dnslookup ( b , qtype = 'ptr' ) #NEWLINE# names . sort ( key = str . __len__ ) #NEWLINE# return names