(self, columnIndex)
return
delete a column
delete a column
delete a column
def deleteColumn(self, columnIndex):
        """delete a column"""
        colname = self.getColumnName(columnIndex)
        self.columnNames.remove(colname)
        del self.columnlabels[colname]
        del self.columntypes[colname]
        #remove this field from every record
        for recname in self.reclist:
            if colname in self.data[recname]:
                del self.data[recname][colname]
        if self.sortkey != None:
            currIndex = self.getColumnIndex(self.sortkey)
            if columnIndex == currIndex:
                self.setSortOrder(0)
        #print 'column deleted'
        #print 'new cols:', self.columnNames
        return
def deleteColumn ( self , columnIndex ) : colname = self . getColumnName ( columnIndex ) self . columnNames . remove ( colname ) del self . columnlabels [ colname ] del self . columntypes [ colname ] #remove this field from every record for recname in self . reclist : if colname in self . data [ recname ] : del self . data [ recname ] [ colname ] if self . sortkey != None : currIndex = self . getColumnIndex ( self . sortkey ) if columnIndex == currIndex : self . setSortOrder ( 0 ) #print 'column deleted' #print 'new cols:', self.columnNames return