(name)
return l
convenience routine for doing an MX lookup of a name. returns a
    sorted list of (preference, mail exchanger) records
convenience routine for doing an MX lookup of a name. returns a
    sorted list of (preference, mail exchanger) records
convenience routine for doing an MX lookup of a name . returns a sorted list of ( preference mail exchanger ) records
def mxlookup(name):
    """
    convenience routine for doing an MX lookup of a name. returns a
    sorted list of (preference, mail exchanger) records
    """
    if Base.defaults['server'] == []:
        Base.DiscoverNameServers()
    a = Base.DnsRequest(name, qtype='mx').req().answers
    l = sorted(map(lambda x: x['data'], a))
    return l
def mxlookup ( name ) : if Base . defaults [ 'server' ] == [ ] : Base . DiscoverNameServers ( ) a = Base . DnsRequest ( name , qtype = 'mx' ) . req ( ) . answers l = sorted ( map ( lambda x : x [ 'data' ] , a ) ) return l