#!/usr/bin/env python3
"""
MIRA Startup Launcher
This script sets up the Python path and runs the main Startup.py module.
"""

import os
import sys

# Add the Startup directory to Python path
startup_dir = os.path.dirname(os.path.abspath(__file__))
if startup_dir not in sys.path:
    sys.path.insert(0, startup_dir)

# Add the parent directory (MIRA root) to Python path 
parent_dir = os.path.dirname(startup_dir)
if parent_dir not in sys.path:
    sys.path.insert(0, parent_dir)

# Now we can run the startup module
if __name__ == "__main__":
    # Import and run the main startup
    import runpy
    sys.argv[0] = os.path.join(startup_dir, 'Startup.py')
    runpy.run_module('Startup', run_name='__main__', alter_sys=True)