(self, filtercol, value, op='contains', userecnames=False,
                     progresscallback=None)
return names
The searching function that we apply to the model data.
           This is used in Filtering.doFiltering to find the required recs
           according to column, value and an operator
The searching function that we apply to the model data.
           This is used in Filtering.doFiltering to find the required recs
           according to column, value and an operator
The searching function that we apply to the model data . This is used in Filtering . doFiltering to find the required recs according to column value and an operator
def filterBy(self, filtercol, value, op='contains', userecnames=False,
                     progresscallback=None):
        """The searching function that we apply to the model data.
           This is used in Filtering.doFiltering to find the required recs
           according to column, value and an operator"""

        funcs = Filtering.operatornames
        floatops = ['=','>','<']
        func = funcs[op]
        data = self.data
        #coltype = self.columntypes[filtercol]
        names=[]
        for rec in self.reclist:
            if filtercol in data[rec]:
                #try to do float comparisons if required
                if op in floatops:
                    try:
                        #print float(data[rec][filtercol])
                        item = float(data[rec][filtercol])
                        v = float(value)
                        if func(v, item) == True:
                            names.append(rec)
                        continue
                    except:
                        pass
                if filtercol == 'name' and userecnames == True:
                    item = rec
                else:
                    item = str(data[rec][filtercol])
                if func(value, item):
                    names.append(rec)
        return names
def filterBy ( self , filtercol , value , op = 'contains' , userecnames = False , progresscallback = None ) : funcs = Filtering . operatornames floatops = [ '=' , '>' , '<' ] func = funcs [ op ] data = self . data #coltype = self.columntypes[filtercol] names = [ ] for rec in self . reclist : if filtercol in data [ rec ] : #try to do float comparisons if required if op in floatops : try : #print float(data[rec][filtercol]) item = float ( data [ rec ] [ filtercol ] ) v = float ( value ) if func ( v , item ) == True : names . append ( rec ) continue except : pass if filtercol == 'name' and userecnames == True : item = rec else : item = str ( data [ rec ] [ filtercol ] ) if func ( value , item ) : names . append ( rec ) return names