Merge pull request #822 from cclauss/fix-undefined-name-xtpGateway_2
Fix undefined name xtpGateway (to dev this time)
This commit is contained in:
commit
202a4009d9
@ -1,6 +1,10 @@
|
|||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
|
||||||
# 重载sys模块,设置默认字符串编码方式为utf8
|
# 重载sys模块,设置默认字符串编码方式为utf8
|
||||||
|
try:
|
||||||
|
reload # Python 2
|
||||||
|
except NameError: # Python 3
|
||||||
|
from importlib import reload
|
||||||
import sys
|
import sys
|
||||||
reload(sys)
|
reload(sys)
|
||||||
sys.setdefaultencoding('utf8')
|
sys.setdefaultencoding('utf8')
|
||||||
@ -19,7 +23,9 @@ from vnpy.trader.uiMainWindow import MainWindow
|
|||||||
from vnpy.trader.gateway import (ctpGateway, oandaGateway,
|
from vnpy.trader.gateway import (ctpGateway, oandaGateway,
|
||||||
ibGateway)
|
ibGateway)
|
||||||
|
|
||||||
if system == 'Windows':
|
if system == 'Linux':
|
||||||
|
from vnpy.trader.gateway import xtpGateway
|
||||||
|
elif system == 'Windows':
|
||||||
from vnpy.trader.gateway import (femasGateway, xspeedGateway,
|
from vnpy.trader.gateway import (femasGateway, xspeedGateway,
|
||||||
futuGateway, secGateway)
|
futuGateway, secGateway)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user