def restore(self):
        if not os.path.exists(self.filename):
            return self
        if not os.path.isfile(self.filename):
            return self

        try:
            with open(self.filename, "rb") as f:
                unpickledObject = pickle.load(f)

            for key in list(self.__dict__.keys()):
                default = self.__dict__[key]
                self.__dict__[key] = unpickledObject.__dict__.get(key, default)
        except:
            pass

        return self
Set the values of whatever attributes are recoverable
dataset/ETHPy150Open datalyze-solutions/pandas-qt/pandasqt/ui/fallback/easygui/boxes/egstore.py/EgStore.restore