fix vtFunction

This commit is contained in:
Bian Jiang 2016-04-29 13:42:29 +08:00
parent 24b0ddfbb7
commit 02d1735bb1
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,6 @@
import decimal
import json
import sys
MAX_NUMBER = 10000000000000
MAX_DECIMAL = 4
@ -25,9 +24,6 @@ def safeUnicode(value):
if abs(d.as_tuple().exponent) > MAX_DECIMAL:
value = round(value, ndigits=MAX_DECIMAL)
# Reload sys, Set default encode to UTF8
reload(sys)
sys.setdefaultencoding('utf8')
return unicode(value)
#----------------------------------------------------------------------

View File

@ -14,6 +14,10 @@ def main():
if platform.uname() == 'Windows':
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('vn.py demo')
# Reload sys, Set default encode to UTF8
reload(sys)
sys.setdefaultencoding('utf8')
# 初始化Qt应用对象
app = QtGui.QApplication(sys.argv)
app.setWindowIcon(QtGui.QIcon('vnpy.ico'))