`

解决了一个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 <paul.robinson at quantisci.co.uk>
To: Arpad Kiss <sekter at matavnet.hu>
Cc: <python-list at python.org>
Sent: Tuesday, March 14, 2000 3:23 PM
Subject: Re: BaseHTTPServer, ThreadingMixIn and COM.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics