SAP R/3 automation with win32com

Alex Martelli aleaxit at
Tue Dec 5 15:29:42 EST 2000

<obou at> wrote in message news:90j81i$c4a$1 at
> I abuse, but is there a way to find the "Makepy" name of a particular
> COM object? I have tons of SAP objects in Makepy and cannot find one
> that correspond to the objects I'm using...
> Do somebody know where Makepy looks for the titles it shows in it's
> listbox?

In the type-library's "helpstring" propriety.  But that is the same
place from which Ole View, AND Visual Basic's "Project/References..."
dialog, also get it, so, if you can find them with any one of these
tools, the others should be no problem.

Alternatively, the EnsureDispatch method of gencache can (probably)
work on an object you already have instantiated (if that object is
reasonably well-behaved) and perform the same work as makepy
would.  Starting with a clean-slate gen_py, you can just then open
with your favourite text-editor the only long-named .py file you'll
find there.

Or, you can do it by studying the registry.  From a ProgId (such as
"feefie.foofum", in the registry under HKEY_CLASSES_ROOT you'll
find the CLSID; under HKEY_CLASSES_ROOT/CLSID/thatclsid, you'll
find the type-library's own GUID, which you can in turn use as a
key under HKEY_CLASSES_ROOT/Libraries to find out everything
about the location of the specific type-library of interest.  OleView
does that for you, by the way, if you start your browsing with an
object rather than going directly for the libraries.


More information about the Python-list mailing list