def _persist(self): #persist filter of linker self.__filter.persist() #save configures of linker fconfigs = Helper.open(self.workdir(), self.__CONFIG_FILE_NAME, "w") json.dump(self.__configs.encode(), fconfigs) fconfigs.close() #save links of linker flinks = Helper.open(self.workdir(), self.__LINKS_FILE_NAME, "w") json.dump(self.__links.encode(), flinks) flinks.close()
def _launch(self): #launch filter of linker self.__filter.launch() #load configures of linker fconfigs = Helper.open(self.workdir(), self.__CONFIG_FILE_NAME, "r") jsonobj = json.load(fconfigs) fconfigs.close() self.__configs.decode(jsonobj) #load links of linker flinks = Helper.open(self.workdir(), self.__LINKS_FILE_NAME, "r") jsonobj = json.load(flinks) flinks.close() self.__links.decode(jsonobj)
def _persist(self): file = Helper.open(self.workdir(), self.name(), "w") json.dump(self.__patterns, file) file.close()
def _launch(self): file = Helper.open(self.workdir(), self.name(), "r") patterns = json.load(file) file.close() self._filter(*tuple(patterns))