-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_mvc.py
26 lines (20 loc) · 923 Bytes
/
app_mvc.py
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
from PySide2.QtWidgets import *
import sys
import os, argparse
# to avoid not working in MAC Big sur
os.environ['QT_MAC_WANTS_LAYER'] = '1'
from tda_mvc.main import MainViewController
parser = argparse.ArgumentParser(description='Run the tda application.')
parser.add_argument('-d', '--debug', default=False, action='store_true',
help='Whether to run as debug mode or not, default is False.')
parser.add_argument('-s', '--save-debug', default=False, action='store_true',
help='Whether to save files for debug, default is False.'
'This option is valid in non-debug mode only.')
args = parser.parse_args()
if __name__ == '__main__':
app = QApplication(sys.argv)
MainViewController.debug = args.debug
MainViewController.saveForDebug = (not args.debug) and args.save_debug
gui = MainViewController()
gui.show()
sys.exit(app.exec_())