update
This commit is contained in:
+9
-2
@@ -1,11 +1,17 @@
|
||||
"""
|
||||
QMT 模块统一入口
|
||||
根据环境自动选择真实 QMT 或模拟器
|
||||
根据配置或环境自动选择真实 QMT 或模拟器
|
||||
"""
|
||||
import sys
|
||||
import config as _config
|
||||
|
||||
|
||||
def _get_qmt():
|
||||
"""获取 QMT 模块"""
|
||||
"""获取 QMT 模块(配置优先于平台检测)"""
|
||||
if _config.use_simulated_qmt:
|
||||
from core.qmt_dummy import qmtv
|
||||
return qmtv
|
||||
|
||||
if sys.platform == 'win32':
|
||||
try:
|
||||
from core.qmt_real import qmtv as real_qmtv
|
||||
@@ -17,5 +23,6 @@ def _get_qmt():
|
||||
from core.qmt_dummy import qmtv
|
||||
return qmtv
|
||||
|
||||
|
||||
# 导出单例
|
||||
qmtv = _get_qmt()
|
||||
Reference in New Issue
Block a user