PEATDB/Compare.py
def findNames(self, srecs, sfields, slabel):
        """Get datasets list from search string"""
        if slabel == '':
            s = re.compile('[a-z]*\d',re.IGNORECASE)
        else:
            s = re.compile(slabel, re.IGNORECASE)
        slabels = []
        for r in srecs:
            rec = self.DB[r]
            for f in sfields:
                if f == 'Structure':
                    if rec.Structure != None:                    
                        slabels.append('has structure')
                    continue
                self.pb.update()
                ftype = self.DB.userfields[f]['field_type']

                if not rec.has_key(f):
                    continue
                E = rec[f]
                for d in E.datasets:
                    self.pb.update()
                    if s.match(d) and not d in slabels:
                        slabels.append(d)
        return slabels
Get datasets list from search string
Get datasets list from search string
Get datasets list from search string
def findNames(self, srecs, sfields, slabel):
        if slabel == '':
            s = re.compile('[a-z]*\d',re.IGNORECASE)
        else:
            s = re.compile(slabel, re.IGNORECASE)
        slabels = []
        for r in srecs:
            rec = self.DB[r]
            for f in sfields:
                if f == 'Structure':
                    if rec.Structure != None:                    
                        slabels.append('has structure')
                    continue
                self.pb.update()
                ftype = self.DB.userfields[f]['field_type']
                if not rec.has_key(f):
                    continue
                E = rec[f]
                for d in E.datasets:
                    self.pb.update()
                    if s.match(d) and not d in slabels:
                        slabels.append(d)
        return slabels
def findNames ( self , srecs , sfields , slabel ) : if slabel == '' : s = re . compile ( '[a-z]*\d' , re . IGNORECASE ) else : s = re . compile ( slabel , re . IGNORECASE ) slabels = [ ] for r in srecs : rec = self . DB [ r ] for f in sfields : if f == 'Structure' : if rec . Structure != None : slabels . append ( 'has structure' ) continue self . pb . update ( ) ftype = self . DB . userfields [ f ] [ 'field_type' ] if not rec . has_key ( f ) : continue E = rec [ f ] for d in E . datasets : self . pb . update ( ) if s . match ( d ) and not d in slabels : slabels . append ( d ) return slabels
Get datasets list from search string
Get datasets list from search string
"""Get datasets list from search string"""
self
srecs
sfields
slabel