解决了一个wsgi非常棘手的问题
Hi, It is needed by the COM infrastructure. When you don't use threads this function call is needed too, but it is done by Python automatically. In a new thread before any COM call you have to call CoIniztialize. If I am right multiply CoInitialize call in the same thread doesn't cause any harm. So putting these lines before 'ExcelApp=win32com.client.Dispatch("Excel.Application")' may help: import pythoncom pythoncom.CoInitialize() I'm not familiar BaseHTTPServer and ThreadingMixin, maybe there is better place to put these lines. This is not Python specific. Look it up in COM docs/books. Best Regards, Arpad ----- Original Message ----- From: Paul Robinson To: Arpad Kiss Cc: Sent: Tuesday, March 14, 2000 3:23 PM Subject: Re: BaseHTTPServer, ThreadingMixIn and COM.