PEATDB/Ekin/Utils.py
def removeEmptyKeys(data):
    """Remove keys from a dict that have no data or zero len lists"""
    import types
    for i in data.keys():
        if type(data[i]) is types.ListType:
            if len(data[i])==0:
                del data[i]

    return data
Remove keys from a dict that have no data or zero len lists
Remove keys from a dict that have no data or zero len lists
Remove keys from a dict that have no data or zero len lists
def removeEmptyKeys(data):
    import types
    for i in data.keys():
        if type(data[i]) is types.ListType:
            if len(data[i])==0:
                del data[i]
    return data
def removeEmptyKeys ( data ) : import types for i in data . keys ( ) : if type ( data [ i ] ) is types . ListType : if len ( data [ i ] ) == 0 : del data [ i ] return data
Remove keys from a dict that have no data or zero len lists
Remove keys from a dict that have no data or zero len lists
"""Remove keys from a dict that have no data or zero len lists"""
data