(self, key=None, **kwargs)
return key
Add a row
Add a row
Add a row
def addRow(self, key=None, **kwargs):
        """Add a row"""
        if key == '':
            return
        if key==None:
            key = self.getNextKey()
        if key in self.data or key in self.reclist:
            print ('name already present!!')
            return
        self.data[key]={}
        for k in kwargs:
            if not k in self.columnNames:
                self.addColumn(k)
            self.data[key][k] = str(kwargs[k])
        self.reclist.append(key)
        return key
def addRow ( self , key = None , * * kwargs ) : if key == '' : return if key == None : key = self . getNextKey ( ) if key in self . data or key in self . reclist : print ( 'name already present!!' ) return self . data [ key ] = { } for k in kwargs : if not k in self . columnNames : self . addColumn ( k ) self . data [ key ] [ k ] = str ( kwargs [ k ] ) self . reclist . append ( key ) return key