def getSortedAccounts():
    """Get a sorted list of configSections"""

    configSections = BMConfigParser().addresses()
    configSections.sort(cmp=lambda x, y: cmp(
        unicode(BMConfigParser().get(x, 'label'), 'utf-8').lower(),
        unicode(BMConfigParser().get(y, 'label'), 'utf-8').lower()))
    return configSections
Example #2
0
def getSortedAccounts():
    configSections = BMConfigParser().addresses()
    configSections.sort(cmp = 
        lambda x,y: cmp(unicode(BMConfigParser().get(x, 'label'), 'utf-8').lower(), unicode(BMConfigParser().get(y, 'label'), 'utf-8').lower())
        )
    return configSections