-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
44 lines (32 loc) · 1.03 KB
/
Copy pathmain.py
File metadata and controls
44 lines (32 loc) · 1.03 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python3
"""Susurrus - Main entry point"""
import logging
import sys
from PyQt6.QtWidgets import QApplication
# Configure logging before any imports
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
datefmt="%H:%M:%S",
handlers=[logging.StreamHandler()],
)
# import after logging is configured
from gui.main_window import MainWindow # noqa: E402
from utils.dependency_check import check_ffmpeg_installation # noqa: E402
def main():
"""Main application entry point"""
logger = logging.getLogger(__name__)
try:
# Check FFMPEG before starting GUI
check_ffmpeg_installation()
# Create and run application
app = QApplication(sys.argv)
window = MainWindow()
window.show()
logger.info("Application started successfully")
sys.exit(app.exec())
except Exception as e:
logger.error(f"Failed to start application: {e}", exc_info=True)
sys.exit(1)
if __name__ == "__main__":
main()