def parseaddr(addr): addrs = _AddressList(addr).addresslist if not addrs: return '', '' return addrs[0]
def getaddresses(fieldvalues): """Return a list of (REALNAME, EMAIL) for each fieldvalue.""" all = COMMASPACE.join(fieldvalues) a = _AddressList(all) return a.addresslist