-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (24 loc) · 784 Bytes
/
main.py
File metadata and controls
28 lines (24 loc) · 784 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
import sys
import logging
from PyQt5.QtWidgets import QApplication
from controller import Controller
from gui.main_window import MainWindow
# Configure logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
logger = logging.getLogger(__name__)
if __name__ == "__main__":
import multiprocessing
multiprocessing.freeze_support()
# freeze_support() is needed for PyInstaller to work correctly on Windows
logger.info("Starting SnapSort")
app = QApplication(sys.argv)
controller = Controller(num_workers=4)
window = MainWindow(controller)
window.show()
exit_code = app.exec_()
logger.info("Exiting with code %s", exit_code)
sys.exit(exit_code)