def write_file(self, filename, var, type=None): if type is None: type = extname(filename) writer = self.get_writer(type) return writer.write_file(filename, var)
def read_file(self, filename, type=None): if type is None: type = extname(filename) reader = self.get_reader(type) return reader.read_file(filename)