草庐IT

stopEvent

全部标签

python - 错误 "The object invoked has disconnected from its clients"- 使用 python 和 win32com 自动化 IE 8

我想自动化InternetExplorer8(在Windows7上使用python2.7)机器。这是我在apostfoundonSO之后的代码:importsys,timefromwin32com.clientimportWithEvents,DispatchimportpythoncomimportthreadingstopEvent=threading.Event()classEventSink(object):defOnNavigateComplete2(self,*args):print"complete",argsstopEvent.set()defwaitUntilRead