-
Notifications
You must be signed in to change notification settings - Fork 255
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (24 loc) · 684 Bytes
/
main.py
File metadata and controls
33 lines (24 loc) · 684 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
# -*- coding: UTF-8 -*-
import multiprocessing
import sys
import os
os.environ["PYTHONIOENCODING"] = "utf-8"
from aiforge import AIForgeEngine # noqa
def run():
"""启动GUI应用程序"""
try:
from src.ai_write_x.license import check_license_and_start
check_license_and_start()
except KeyboardInterrupt:
sys.exit(0)
except Exception:
raise
if __name__ == "__main__":
multiprocessing.freeze_support()
multiprocessing.set_start_method("spawn", force=True)
if AIForgeEngine.handle_sandbox_subprocess(
globals_dict=globals().copy(), sys_path=sys.path.copy()
):
sys.exit(0)
else:
run()