fix vtFunction
This commit is contained in:
parent
24b0ddfbb7
commit
02d1735bb1
@ -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)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user