Files
kiauh/kiauh/main.py
dw-0 3317114780 refactor(kiauh): remove legacy scripts, configurations, and assets af… (#729)
refactor(kiauh): remove legacy scripts, configurations, and assets after migration to Python-based KIAUH v6
2025-10-11 16:38:08 +02:00

34 lines
1.1 KiB
Python

# ======================================================================= #
# Copyright (C) 2020 - 2025 Dominik Willner <th33xitus@gmail.com> #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
# #
# This file may be distributed under the terms of the GNU GPLv3 license #
# ======================================================================= #
import io
import sys
from core.logger import Logger
from core.menus.main_menu import MainMenu
from core.settings.kiauh_settings import KiauhSettings
def ensure_encoding() -> None:
if sys.stdout.encoding == "UTF-8" or not isinstance(sys.stdout, io.TextIOWrapper):
return
sys.stdout.reconfigure(encoding="utf-8")
def main() -> None:
try:
KiauhSettings()
ensure_encoding()
MainMenu().run()
except KeyboardInterrupt:
Logger.print_ok("\nHappy printing!\n", prefix=False)
if __name__ == "__main__":
main()