-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch.py
More file actions
62 lines (47 loc) · 1.47 KB
/
launch.py
File metadata and controls
62 lines (47 loc) · 1.47 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env python3
"""
TTK Benchmark App Launcher
Simple launcher script with error handling
"""
import sys
import os
def check_dependencies():
"""Check if all required dependencies are available."""
missing = []
try:
import tkinter
except ImportError:
missing.append("tkinter (usually comes with Python)")
try:
import psutil
except ImportError:
missing.append("psutil (install with: pip install psutil)")
if missing:
print("Missing dependencies:")
for dep in missing:
print(f" - {dep}")
print("\nPlease install missing dependencies and try again.")
return False
return True
def main():
"""Main launcher function."""
print("TTK Benchmark Test App")
print("=" * 30)
if not check_dependencies():
sys.exit(1)
print("All dependencies found. Starting application...")
try:
# Import and run the main application
from main import TTKBenchmarkApp
import tkinter as tk
root = tk.Tk()
app = TTKBenchmarkApp(root)
print("Application started successfully!")
print("Close the GUI window to exit.")
root.mainloop()
except Exception as e:
print(f"Error starting application: {e}")
print("Please check that all files are present and dependencies are installed.")
sys.exit(1)
if __name__ == "__main__":
main()