-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
36 lines (30 loc) · 871 Bytes
/
main.py
File metadata and controls
36 lines (30 loc) · 871 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
32
33
34
35
36
#!/usr/bin/env python3
"""
WinPick - Windows Scripts Manager
Main entry point for the application
"""
import os
import sys
import ctypes
import traceback
from tkinter import messagebox
from src.utils.message_handler import MessageHandler
# Check for administrator rights and display a message
def is_admin():
try:
return ctypes.windll.shell32.IsUserAnAdmin() != 0
except Exception:
return False
def main():
try:
# Import the app module
from src.ui.app import ScriptExplorer
# Create and run the application
app = ScriptExplorer()
app.mainloop()
except Exception as e:
error_msg = f"Error starting application: {str(e)}\n{traceback.format_exc()}"
print(error_msg)
MessageHandler.error(error_msg, "Application Error")
if __name__ == "__main__":
main()