(self, numrows=None)
return keys
Automatically add x number of records
Automatically add x number of records
Automatically add x number of records
def autoAddRows(self, numrows=None):
        """Automatically add x number of records"""
        rows = self.getRowCount()
        ints = [i for i in self.reclist if isinstance(i, int)]
        if len(ints)>0:
            start = max(ints)+1
        else:
            start = 0
        #we don't use addRow as it's too slow
        keys = range(start,start+numrows)
        #make sure no keys are present already
        keys = list(set(keys)-set(self.reclist))
        newdata = {}
        for k in keys:
            newdata[k] = {}
        self.data.update(newdata)
        self.reclist.extend(newdata.keys())
        return keys
def autoAddRows ( self , numrows = None ) : rows = self . getRowCount ( ) ints = [ i for i in self . reclist if isinstance ( i , int ) ] if len ( ints ) > 0 : start = max ( ints ) + 1 else : start = 0 #we don't use addRow as it's too slow keys = range ( start , start + numrows ) #make sure no keys are present already keys = list ( set ( keys ) - set ( self . reclist ) ) newdata = { } for k in keys : newdata [ k ] = { } self . data . update ( newdata ) self . reclist . extend ( newdata . keys ( ) ) return keys