INNER CODE UNIT · Python

reset_gui_settings

pairinteraction/pairinteraction · src/pairinteraction/cli.py:167

def reset_gui_settings() -> int:
    """Delete the GUI settings file to restore default values."""
    from pairinteraction._backend import get_cache_directory

    settings_file = get_cache_directory() / "gui_settings.ini"

    if not settings_file.exists():
        print("No GUI settings file found. Nothing to delete.")
        return 0

    confirmation = input(f"Are you sure you want to delete the GUI settings file {settings_file}? (y/N): ")
    if confirmation.lower() not in ["y", "yes"]:
        print(Fore.YELLOW + "Aborted deletion of GUI settings." + Style.RESET_ALL)
        return 0

    try:
        settings_file.unlink()
    except Exception as e:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…