python, COM and multithreading issue
问题 I'm trying to take a look at IE's DOM from a separate thread that dispatched IE, and for some properties I'm getting a "no such interface supported" error. I managed to reduce the problem to this script: import threading, time import pythoncom from win32com.client import Dispatch, gencache gencache.EnsureModule('{3050F1C5-98B5-11CF-BB82-00AA00BDCE0B}', 0, 4, 0) # MSHTML def main(): pythoncom.CoInitializeEx(0) ie = Dispatch('InternetExplorer.Application') ie.Visible = True ie.Navigate('http:/