SXXXXXXX_Radalyze/radalyze/__main__.py
2025-06-13 14:13:29 +02:00

31 lines
1012 B
Python

import tkinter as tk
from radalyze.gui.main_window import RadalyzeApp
def main() -> None:
"""
Initializes and runs the Radalyze application.
This function sets up the main Tkinter window, creates an instance
of the main application class, and starts the event loop.
"""
try:
# Create the main window
root = tk.Tk()
# Create the application instance, passing the root window
app = RadalyzeApp(root)
# Start the application's main loop
app.run()
except Exception as e:
# A final catch-all for unexpected errors during startup.
# This is crucial for debugging if the app fails to launch.
print(f"CRITICAL: A fatal error occurred during application startup: {e}")
# In a real-world scenario, you might want to log this to a file
# or show a simple error dialog if possible.
import traceback
traceback.print_exc()
if __name__ == "__main__":
main()