467,867 Members | 1,245 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,867 developers. It's quick & easy.

[PythonWin] MakePy and gencache.EnsureModule() do different things.

I used MakePy to generate .py support for a COM dll. That created the


I want to be sure that this file is present and so I used MakePy -i to
construct a call to gencache.EnsureModule().

This is what it said:

{30D58DAF-B538-45F1-8EFF-F69ABA2BA798}, lcid=0, major=1, minor=13
# Use these commands in Python code to auto generate .py support
from win32com.client import gencache

0, 1, 13)

But when I execute this code, it creates the support as a package,
that is, there is a _folder_ called


(NB minor version is 19 not 13) with separate .py files for each
interface and class inside, and an __init__.py.

If the EnsureModule() call has not been called to generate the
package, then win32com.client.CastTo() fails when called with a
class-instance and interface defined in the COM dll. It complains that
it can't find the package ...x19.

Can anyone explain the version number difference (I realize that
19=0x13 but that doesn't help me understand it much), the
package/single file difference, and why Dispatch responds to the one,
but CastTo expects the other?
Jul 19 '05 #1
  • viewed: 1668

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alv Mart | last post: by
1 post views Thread by Olaf Meding | last post: by
reply views Thread by Sam Sungshik Kong | last post: by
1 post views Thread by Chris Curvey | last post: by
reply views Thread by Kai Rosenthal | last post: by
reply views Thread by Alan Meyer | last post: by
4 posts views Thread by sterling | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.