-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_app.py
More file actions
29 lines (26 loc) · 793 Bytes
/
Copy pathdebug_app.py
File metadata and controls
29 lines (26 loc) · 793 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
import sys
import os
import traceback
from PyQt6.QtWidgets import QApplication
def check_syntax(files):
print("Checking Syntax...")
for f in files:
try:
with open(f, 'r') as file:
compile(file.read(), f, 'exec')
print(f"OK: {f}")
except Exception as e:
print(f"SYNTAX ERROR in {f}: {e}")
def test_ui_init():
print("\nTesting MainWindow Init...")
try:
from ui_main import MainWindow
app = QApplication(sys.argv)
w = MainWindow()
print("MainWindow instantiated successfully.")
# Don't show, just exit
except Exception:
traceback.print_exc()
if __name__ == "__main__":
check_syntax(["ui_main.py", "config.py", "mover.py", "main.py"])
test_ui_init()