PEATDB/Search.py
def searchfunc(self, col, attr, val, op):
        """attr is a subkey in the dict that can be recursively found """
        floatops = ['=','>','<']
        func = self.funcs[op]
        data = self.data
        names=[]
        subdata = {}
        print attr
        for rec in self.reclist:
            if data[rec].has_key(col):
                item = self.data[rec][col]
                print type(item)
                #if not type(item) is types.DictType():
                #    continue
                #do recursive search if sub dicts
                if attr in item:
                    if func(val, item[attr]):
                        names.append(rec)

        return names
attr is a subkey in the dict that can be recursively found 
attr is a subkey in the dict that can be recursively found
attr is a subkey in the dict that can be recursively found
def searchfunc(self, col, attr, val, op):
        floatops = ['=','>','<']
        func = self.funcs[op]
        data = self.data
        names=[]
        subdata = {}
        print attr
        for rec in self.reclist:
            if data[rec].has_key(col):
                item = self.data[rec][col]
                print type(item)
                if attr in item:
                    if func(val, item[attr]):
                        names.append(rec)
        return names
def searchfunc ( self , col , attr , val , op ) : floatops = [ '=' , '>' , '<' ] func = self . funcs [ op ] data = self . data names = [ ] subdata = { } print attr for rec in self . reclist : if data [ rec ] . has_key ( col ) : item = self . data [ rec ] [ col ] print type ( item ) if attr in item : if func ( val , item [ attr ] ) : names . append ( rec ) return names
attr is a subkey in the dict that can be recursively found
attr is a subkey in the dict that can be recursively found
"""attr is a subkey in the dict that can be recursively found """ #if not type(item) is types.DictType(): #    continue #do recursive search if sub dicts
self
col
attr
val
op