From d1f211a45fc23344fdf9cdd6f8c9585f86fb619f Mon Sep 17 00:00:00 2001 From: lamter Date: Thu, 27 Apr 2017 10:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=20-=20change=20:=20=E4=BF=AE=E6=AD=A3=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=BF=9E=E6=8E=A5CTP=E7=9A=84=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.docker/server_vnpy.sh | 2 +- vn.trader/gateway/windGateway/windGateway.py | 2 +- vn.trader/vtServer.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/vn.docker/server_vnpy.sh b/vn.docker/server_vnpy.sh index b4a8ab99..4c5490bf 100755 --- a/vn.docker/server_vnpy.sh +++ b/vn.docker/server_vnpy.sh @@ -3,7 +3,7 @@ cd .. docker run --name vnpy --rm \ -v `pwd`:/srv/vnpy \ - -v `pwd`/../vn.trader/VT_setting.json:/etc/vnpy/VT_setting.json \ + -v `pwd`/vn.trader/tmp/VT_setting.json:/etc/vnpy/VT_setting.json \ -p 2014:2014 -p 602:602 \ vnpy:latest \ python /srv/vnpy/vn.trader/vtServer.py --VT_setting /etc/vnpy/VT_setting.json diff --git a/vn.trader/gateway/windGateway/windGateway.py b/vn.trader/gateway/windGateway/windGateway.py index 53d90653..1e04c8cc 100644 --- a/vn.trader/gateway/windGateway/windGateway.py +++ b/vn.trader/gateway/windGateway/windGateway.py @@ -9,7 +9,7 @@ from copy import copy try: from WindPy import w except ImportError: - print u'请先安装WindPy接口' + print(u'请先安装WindPy接口') from vtGateway import * diff --git a/vn.trader/vtServer.py b/vn.trader/vtServer.py index e85c04f4..1c137932 100644 --- a/vn.trader/vtServer.py +++ b/vn.trader/vtServer.py @@ -1,5 +1,8 @@ # encoding: utf-8 +import sys +reload(sys) +sys.setdefaultencoding('utf-8') import vtGlobal import json import os @@ -66,7 +69,7 @@ class VtServer(RpcServer): #---------------------------------------------------------------------- def printLog(content): """打印日志""" - print datetime.now().strftime("%H:%M:%S"), '\t', content + print(datetime.now().strftime("%H:%M:%S"), '\t', content) #----------------------------------------------------------------------