求助,求助:
python调用COM接口里面的方法,没问题,调用事件没反应没报错(表示没触发,但是VB写的程序,证实确实已经触发了事件了)
python调用有事件发生的COM,源代码如下
import win32com.client
import pythoncom
class TrackingEvent(object):
def IdentifyTire(self):
print 'IdentifyTire event detected'
p1 = win32com.client.DispatchWithEvents("UCI.RQPTireTracking.1", TrackingEvent)
pythoncom.PumpMessages()