-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
35 lines (28 loc) · 1.02 KB
/
main.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
27
28
29
30
31
32
33
34
35
if __name__ == "__main__":
import multiprocessing
multiprocessing.freeze_support()
import argparse
import contextlib
import os
from src.signal_editor.app import main
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--dev", action="store_true")
parser.add_argument("-p", "--profile", action="store_true")
parser.add_argument("-c", "--console", action="store_true")
parser.add_argument("-a", "--antialias", action="store_true")
args = parser.parse_args()
os.environ["PYQTGRAPH_QT_LIB"] = "PySide6"
os.environ["PYDEVD_DISABLE_FILE_VALIDATION"] = "1"
if args.dev:
os.environ["QT_LOGGING_RULES"] = "qt.pyside.libpyside.warning=true"
os.environ["DEV_MODE"] = "1"
if args.profile:
os.environ["PROFILE"] = "1"
if args.console:
os.environ["ENABLE_CONSOLE"] = "1"
if args.antialias:
os.environ["PG_ANTIALIAS"] = "1"
with contextlib.suppress(Exception):
import dotenv
dotenv.load_dotenv(".env")
main()