def save(self, path):
        "Saves complete namespace tree to file given by path."
        if self.__master is None:
            state = self.__get_state()
            data = zlib.compress(pickletools.optimize(pickle.dumps(state)), 9)
            with open(path, 'wb') as file:
                file.write(data)
        else:
            self.__master.save(path)
Saves complete namespace tree to file given by path.
recipes/Python/578173_Settings_Organizer/recipe-578173.py