PEATDB/TableModels.py
def auto_AddRows(self, numrows=None):
        """Automatically add x number of records"""
        import string
        alphabet = string.lowercase[:26]
        rows = self.getRowCount()

        if rows <= 25:
            i=rows
            j=0
        else:
            i=int(rows%25)
            j=int(round(rows/25,1))
        #print i, j
        for x in range(numrows):
            if i >= len(alphabet):
                i=0
                j=j+1
            name = alphabet[i]+str(j)
            if name in self.reclist:
                pass
            else:
                self.addRow(name)
            i=i+1
            #print self.reclist
        return
Automatically add x number of records
Automatically add x number of records
Automatically add x number of records
def auto_AddRows(self, numrows=None):
        import string
        alphabet = string.lowercase[:26]
        rows = self.getRowCount()
        if rows <= 25:
            i=rows
            j=0
        else:
            i=int(rows%25)
            j=int(round(rows/25,1))
        for x in range(numrows):
            if i >= len(alphabet):
                i=0
                j=j+1
            name = alphabet[i]+str(j)
            if name in self.reclist:
                pass
            else:
                self.addRow(name)
            i=i+1
        return
def auto_AddRows ( self , numrows = None ) : import string alphabet = string . lowercase [ : 26 ] rows = self . getRowCount ( ) if rows <= 25 : i = rows j = 0 else : i = int ( rows % 25 ) j = int ( round ( rows / 25 , 1 ) ) for x in range ( numrows ) : if i >= len ( alphabet ) : i = 0 j = j + 1 name = alphabet [ i ] + str ( j ) if name in self . reclist : pass else : self . addRow ( name ) i = i + 1 return
Automatically add x number of records
Automatically add x number of records
"""Automatically add x number of records""" #print i, j #print self.reclist
self
numrows