[python-win32] makepy creates gen_py/123-ID.py but no gen_py/ 123-ID - Folder

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed Nov 10 11:48:28 CET 2004


[The Count]

| Still it remains a puzzle to me how I got the folder that first time 
| around since I just now heard of EnsureDispatch ...
| ... which - as Tim's page on wmi suggests can work even with 
| non-makepy-ed libraries, which seems to be it's only real asset 
| over "pure" Dispatch, right?

OK, just to clear the confusion which my posts have probably
created:

+ Too all intents and purposes, EnsureDispatch is the same
  as running makepy.py on the library. I've had a quick
  glance at the source, and they don't appear to be sharing
  (much) code, but I think they can be considered functionally
  equal.

+ The only reason for my suggesting it earlier was because
  I hoped that some obscure problem might -- magically --
  be resolved by trying to do the same thing a different
  way.

+ I personally call win32com.client.gencache.EnsureDispatch
  normally when my code is trying to dispatch something,
  because then I get the advantages of the proxy module
  without having to think about makepy.py. This is especially
  useful when you're handing out code to tun on other
  peoples' machines.

+ As long as an object can be Dispatch'd you've got a
  chance of running EnsureDispatch on it, even if it
  doesn't have an entry in that list of libraries which
  makepy.py presents you with. I'm afraid my knowledge 
  of COM-related stuff has now been exceeded, and I don't
  have the time to go through the source for makepy.py
  etc. at the moment, much as I'd like to.

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-win32 mailing list