-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
45 lines (35 loc) · 992 Bytes
/
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
36
37
38
39
40
41
42
43
44
45
# -*- coding: utf-8 -*-
"""
启动入口
date: 2018/12/26
"""
import os
import pahk
__author__ = 'hhaoao'
import sys
from multiprocessing import Process
from Api.ProxyApi import run as ProxyApiRun
from Schedule.ProxyValidSchedule import run as ValidRun
from Schedule.ProxyRefreshSchedule import run as RefreshRun
def run():
p_list = list()
p1 = Process(target=ProxyApiRun, name='ProxyApiRun')
p_list.append(p1)
p2 = Process(target=ValidRun, name='ValidRun')
p_list.append(p2)
p3 = Process(target=RefreshRun, name='RefreshRun')
p_list.append(p3)
# p4 = Process(target=)
for p in p_list:
p.daemon = True
p.start()
for p in p_list:
p.join()
if __name__ == '__main__':
from translate.translation import start_gui
ahk_code = os.path.abspath('.') + '/translate/bin/scripts/hotkey.ahk'
ahk_interpreter = pahk.Interpreter()
ahk_interpreter.execute_file(ahk_code)
start_gui()
# start_gui()
# run()