def get_parser(self): p = self._parser if p is None: p = CSVColumnParser() p.load(self.file_source_path) self._parser = p return p
def _load_analyses(self): from pychron.core.csv.csv_parser import CSVColumnParser par = CSVColumnParser(delimiter=',') par.load(self.path) if par.check(('runid', 'age', 'age_err')): return self._get_items_from_file(par) else: warning(None, 'Invalid file format. Minimum columns required are "runid", "age", "age_err"')
def set_items_from_file(self, p): if os.path.isfile(p): # def construct(d): if p.endswith('.xls'): self.information_dialog('Plotting Spectra from Excel file not yet implemented') else: par = CSVColumnParser(delimiter='\t') par.load(p) self.analyses = self._get_items_from_file(par) self._update_analyses() self.dump_tool()
def set_items_from_file(self, p): if os.path.isfile(p): # def construct(d): if p.endswith('.xls'): self.information_dialog( 'Plotting Spectra from Excel file not yet implemented') else: par = CSVColumnParser(delimiter='\t') par.load(p) self.analyses = self._get_items_from_file(par) self._update_analyses() self.dump_tool()
def _load_analyses(self): from pychron.core.csv.csv_parser import CSVColumnParser par = CSVColumnParser(delimiter=',') par.load(self.path) if par.check(('runid', 'age', 'age_err')): return self._get_items_from_file(par) else: warning( None, 'Invalid file format. Minimum columns required are "runid", "age", "age_err"' )
def _load_csv_data(self, p): if os.path.isfile(p): parser = CSVColumnParser() parser.load(p) records = [CSVRecord(**row) for row in parser.values()] records.extend((CSVRecord() for i in range(50 - len(records)))) self.records = records self._make_groups() self.data_path = p self.dirty = False
def _load_analyses(self): from pychron.core.csv.csv_parser import CSVColumnParser par = CSVColumnParser(delimiter=',') par.load(self.path) return self._get_items_from_file(par)
def load(self, p): cp = CSVColumnParser() cp.load(p) self._cp = cp