def get_accts_text(type_=''): from common import profile, protocolmeta protos = oset(a.protocol for a in getattr(profile.account_manager, type_ + 'accounts')) protos = (protocol_ordering & protos) | protos return ', '.join(protocolmeta.nice_name_for_proto(name) for name in protos)
def get_acct_name(protocol): from common import protocolmeta return protocolmeta.nice_name_for_proto(protocol)