PEATDB/Base.py
def deleteField(self, fname, callback=None):
        """Remove the field from all records"""
        if not fname in self.meta.userfields:
            print 'field name not in userfields..'
        i=0    
        for k in self.data.keys():            
            if fname in self.data[k].keys() and type(self.data[k]) is PEATRecord:                
                #del self.data[k][fname]
                self.data[k].delete(fname)
            i+=1
            self._checkTransactionSize()
            if callback != None:               
                callback(float(i)/self.length()*100)
        del self.meta.userfields[fname]
        self.meta._p_changed = 1
        return
Remove the field from all records
Remove the field from all records
Remove the field from all records
def deleteField(self, fname, callback=None):
        if not fname in self.meta.userfields:
            print 'field name not in userfields..'
        i=0    
        for k in self.data.keys():            
            if fname in self.data[k].keys() and type(self.data[k]) is PEATRecord:                
                self.data[k].delete(fname)
            i+=1
            self._checkTransactionSize()
            if callback != None:               
                callback(float(i)/self.length()*100)
        del self.meta.userfields[fname]
        self.meta._p_changed = 1
        return
def deleteField ( self , fname , callback = None ) : if not fname in self . meta . userfields : print 'field name not in userfields..' i = 0 for k in self . data . keys ( ) : if fname in self . data [ k ] . keys ( ) and type ( self . data [ k ] ) is PEATRecord : self . data [ k ] . delete ( fname ) i += 1 self . _checkTransactionSize ( ) if callback != None : callback ( float ( i ) / self . length ( ) * 100 ) del self . meta . userfields [ fname ] self . meta . _p_changed = 1 return
Remove the field from all records
Remove the field from all records
"""Remove the field from all records""" #del self.data[k][fname]
self
fname
callback