def save_setting(key, value, section='General'): Config.read(SETTINGS_FILE) Config.set(section, key, value) Config.write()