=>Py3.5
This commit is contained in:
parent
989c218730
commit
27bc1b8959
@ -1,7 +1,7 @@
|
|||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
|
||||||
# 系统模块
|
# 系统模块
|
||||||
from Queue import Queue, Empty
|
from queue import Queue, Empty
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
@ -10,8 +10,7 @@ from collections import defaultdict
|
|||||||
from qtpy.QtCore import QTimer
|
from qtpy.QtCore import QTimer
|
||||||
|
|
||||||
# 自己开发的模块
|
# 自己开发的模块
|
||||||
from eventType import *
|
from vnpy.event.eventType import *
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
class EventEngine(object):
|
class EventEngine(object):
|
||||||
@ -336,12 +335,12 @@ def test():
|
|||||||
"""测试函数"""
|
"""测试函数"""
|
||||||
import sys
|
import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from PyQt4.QtCore import QCoreApplication
|
from qtpy import QtWidgets,QtCore
|
||||||
|
|
||||||
def simpletest(event):
|
def simpletest(event):
|
||||||
print u'处理每秒触发的计时器事件:%s' % str(datetime.now())
|
print( u'处理每秒触发的计时器事件:%s' % str(datetime.now()))
|
||||||
|
|
||||||
app = QCoreApplication(sys.argv)
|
app = QtWidgets.QApplication([])
|
||||||
|
|
||||||
ee = EventEngine2()
|
ee = EventEngine2()
|
||||||
#ee.register(EVENT_TIMER, simpletest)
|
#ee.register(EVENT_TIMER, simpletest)
|
||||||
|
@ -30,12 +30,11 @@ def test():
|
|||||||
|
|
||||||
for key, value in check_dict.items():
|
for key, value in check_dict.items():
|
||||||
if len(value)>1:
|
if len(value)>1:
|
||||||
print u'存在重复的常量定义:' + str(key)
|
print(u'存在重复的常量定义:' + str(key) )
|
||||||
for name in value:
|
for name in value:
|
||||||
print name
|
print(name)
|
||||||
print ''
|
|
||||||
|
|
||||||
print u'测试完毕'
|
print( u'测试完毕')
|
||||||
|
|
||||||
|
|
||||||
# 直接运行脚本可以进行测试
|
# 直接运行脚本可以进行测试
|
||||||
|
Loading…
Reference in New Issue
Block a user