# dependencyanalyzer/__main__.py import tkinter as tk from dependencyanalyzer.gui import ( DependencyAnalyzerApp, ) # Relative import from gui.py within the same package from dependencyanalyzer.core import ( logging, ) # Import logging from core to ensure its configuration is used def main(): """ Main function to launch the Dependency Analyzer application. """ # Ensure core logger is configured if not already by an import in gui # (though it should be via the gui.py -> core.py import chain) if not logging.getLogger().hasHandlers(): # Check if root logger has handlers logging.basicConfig( level=core.logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s" ) logging.info("Root logger reconfigured from __main__ for safety.") root = tk.Tk() # Set a minimum size for the window for better usability root.minsize(width=750, height=600) app = DependencyAnalyzerApp(master=root) app.mainloop() if __name__ == "__main__": # This allows running the script directly using `python __main__.py` # when inside the `dependency_analyzer` directory, primarily for development/testing. # The typical execution for users will be `python -m dependency_analyzer`. main()