win32com/makepy question
Tim Golden
tim.golden at viacom-outdoor.co.uk
Fri Jan 28 04:06:15 EST 2005
[Tom Willis]
| It seems in COM late binding is something that should be
| avoided if possible.
|
| Because python seems to be really good at doing thing dynamically I'm
| wondering why no one has figured out how to make the functionality in
| makepy fire automagically when you need it.
I (nearly) always use win32com.client.gencache.EnsureDispatch. There
are a few occasions when it refuses to play, and then I'm back to
Dispatch.
<code>
import win32com.client
word = win32com.client.gencache.EnsureDispatch ("Word.Application")
#
# does the same as Dispatch ("Word.Application") but does
# the makepy stuff first if it needs to.
#
</code>
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-list
mailing list