def _file_changed(self): ms = Material() rpart = self.file.rpartition('.') # HDF5 does not work! # Should launch a view to select group and row here row = None groupname = '' if (rpart[2] in ['h5', 'hdf5', 'H5', 'HDF5']) and (groupname != ''): if isinstance(row, int): ms.load_from_hdf5(str(self.file), groupname, row) else: ms_out.load_from_hdf5(str(self.file), groupname) elif (rpart[2] in ['txt', 'TXT']): ms.load_from_text(str(self.file)) self.update_from_material(ms) self.material = ms