PEATDB/PEATTables.py
def update_colors(self):
        """Update from table from DB metadata"""

        if self.meta.has_key('table') and self.meta['table'].has_key('colors'):
            self.colors = self.meta['table']['colors']
            self.columnlabels = self.meta['table']['columnlabels']
            if self.meta['table'].has_key('columnorder'):
                self.columnOrder = self.meta['table']['columnorder']               
        else:
            self.meta['table']={}
            self.meta['table']['colors'] = self.colors
            for colname in self.columnNames:
                self.columnlabels[colname]=colname
            self.meta['table']['columnlabels'] = self.columnlabels
            self.meta['table']['columnorder'] = self.getColOrder()  
        return
Update from table from DB metadata
Update from table from DB metadata
Update from table from DB metadata
def update_colors(self):
        if self.meta.has_key('table') and self.meta['table'].has_key('colors'):
            self.colors = self.meta['table']['colors']
            self.columnlabels = self.meta['table']['columnlabels']
            if self.meta['table'].has_key('columnorder'):
                self.columnOrder = self.meta['table']['columnorder']               
        else:
            self.meta['table']={}
            self.meta['table']['colors'] = self.colors
            for colname in self.columnNames:
                self.columnlabels[colname]=colname
            self.meta['table']['columnlabels'] = self.columnlabels
            self.meta['table']['columnorder'] = self.getColOrder()  
        return
def update_colors ( self ) : if self . meta . has_key ( 'table' ) and self . meta [ 'table' ] . has_key ( 'colors' ) : self . colors = self . meta [ 'table' ] [ 'colors' ] self . columnlabels = self . meta [ 'table' ] [ 'columnlabels' ] if self . meta [ 'table' ] . has_key ( 'columnorder' ) : self . columnOrder = self . meta [ 'table' ] [ 'columnorder' ] else : self . meta [ 'table' ] = { } self . meta [ 'table' ] [ 'colors' ] = self . colors for colname in self . columnNames : self . columnlabels [ colname ] = colname self . meta [ 'table' ] [ 'columnlabels' ] = self . columnlabels self . meta [ 'table' ] [ 'columnorder' ] = self . getColOrder ( ) return
Update from table from DB metadata
Update from table from DB metadata
"""Update from table from DB metadata"""
self