PEATDB/Ekin/Base.py
def loadData(self, data=None):
        """Load the data into self.data and update selector etc"""

        # Did we get data or should we just add an empty data window?
        if data == None or type(data) is types.StringType:
            self.data={}
            self.datasets=[]
            self.__datatabs_fits__= {}
            M = MetaData()
            self.__meta_data__ = M.data
        else:
            self.data = copy.deepcopy(data)
            self.datasets=[]
            # Set mode if present
            if self.data.has_key('mode'):
                self.currentmode = self.data['mode']
                del self.data['mode']
            #we now load the special dicts directly, so same names
            for name in self.ekinfields:
                  if data.has_key(name):
                      self.__dict__[name]=copy.deepcopy(self.data[name])
                      del self.data[name]
            #populate list of datasets
            for dataset in self.data.keys():
                if dataset in self.ekinfields:
                    continue
                self.datasets.append(dataset)
        self.length = len(self.datasets)
        self.checkMeta()
        return
Load the data into self.data and update selector etc
Load the data into self.data and update selector etc
Load the data into self . data and update selector etc
def loadData(self, data=None):
        if data == None or type(data) is types.StringType:
            self.data={}
            self.datasets=[]
            self.__datatabs_fits__= {}
            M = MetaData()
            self.__meta_data__ = M.data
        else:
            self.data = copy.deepcopy(data)
            self.datasets=[]
            if self.data.has_key('mode'):
                self.currentmode = self.data['mode']
                del self.data['mode']
            for name in self.ekinfields:
                  if data.has_key(name):
                      self.__dict__[name]=copy.deepcopy(self.data[name])
                      del self.data[name]
            for dataset in self.data.keys():
                if dataset in self.ekinfields:
                    continue
                self.datasets.append(dataset)
        self.length = len(self.datasets)
        self.checkMeta()
        return
def loadData ( self , data = None ) : if data == None or type ( data ) is types . StringType : self . data = { } self . datasets = [ ] self . __datatabs_fits__ = { } M = MetaData ( ) self . __meta_data__ = M . data else : self . data = copy . deepcopy ( data ) self . datasets = [ ] if self . data . has_key ( 'mode' ) : self . currentmode = self . data [ 'mode' ] del self . data [ 'mode' ] for name in self . ekinfields : if data . has_key ( name ) : self . __dict__ [ name ] = copy . deepcopy ( self . data [ name ] ) del self . data [ name ] for dataset in self . data . keys ( ) : if dataset in self . ekinfields : continue self . datasets . append ( dataset ) self . length = len ( self . datasets ) self . checkMeta ( ) return
Load the data into self.data and update selector etc
Load the data into self . data and update selector etc
"""Load the data into self.data and update selector etc""" # Did we get data or should we just add an empty data window? # Set mode if present #we now load the special dicts directly, so same names #populate list of datasets
self
data