def save(self): config_dir = user_config_dir() filename = os.path.join(config_dir, CONFIG_NAME) with open(filename, 'w') as f: json.dump(self.config, f, indent=3)