-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (25 loc) · 877 Bytes
/
Copy pathmain.py
File metadata and controls
31 lines (25 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import sys
import os
from pathlib import Path
def main():
try:
project_root = str(Path(__file__).parent.absolute())
if project_root not in sys.path:
sys.path.insert(0, project_root)
from src.ui import run_cli
print("\n" + "="*50)
print("Welcome to Apex Analysis (Educational Use Only)".center(50))
print("="*50 + "\n")
run_cli()
except ImportError as e:
print(f"\nError: Failed to import required module - {str(e)}")
print("Please ensure all dependencies are installed by running:")
print("pip install -r requirements.txt\n")
sys.exit(1)
except Exception as e:
print(f"\nAn unexpected error occurred: {str(e)}\n")
import traceback
traceback.print_exc()
sys.exit(1)
if __name__ == "__main__":
main()