win32com: Seeking decent class browser.

Alan Kennedy alanmk at hotmail.com
Tue Nov 5 08:30:32 EST 2002


Hi all,

I've been doing some windows coding, using Mark H's windows extensions:
most excellent they are too.

There is only one small problem I am having, and that is getting detail
on interfaces presented by COM objects. When a COM call returns an
object, it can be a lot of reading to try and find out exactly what are
the capabilities of the returned object. What primary interface does it
support? What secondary interfaces does it support? What are the methods
and attributes of those interfaces?

What I've been doing up to now is 

 o Running "makepy.py" on the COM objects
 o Examining the generated python code
 o Consulting the Microsoft documentation

And that works: I just think it's not the optimal way to do things.

Take for example the HTML parser built into IE. I've been playing with
that, to carry out a "tidy" like role, i.e. parse not-well-formed HTML,
load it into a DOM tree, and generate SAX2 events from it, so that I can
build a DOM that I can use xpath on, etc.  Now, when you access the IE
HTML DOM, it returns objects that implement the javascript-like
interface familiar to HTML coders. However, all of the objects support,
as secondary interfaces, DOM level 1, i.e. the interface "IHTMLDOMNode".
Also, there are quite a few "peculiarities" to the interfaces: For
example, the css stylesheet access is different from all other node
access. Trying to find that out information takes a lot of wading
through generated code and Microsoft documentation.

What I'm looking for is a simple class browser that allows me to browse
around the class/interface hierarchy for COM components. I know there is
one that comes with VB, but I'm not going to buy VB just to get the
class browser, especially since I don't know if it does what I want.
I've tried a couple of the free tools, such as the "ProgID Browser" and
the "ActiveX Documenter".

http://home.wtal.de/ib/freisoft
http://www.vbaccelerator.com/codelib/actvxdoc/article.htm

However, these tools don't allow one to "follow trails", i.e. to see the
return type from a method call that returns an object, and then browse
onto the definition of that objects class and interfaces, etc.

So, finally, the question: Does anyone know of a decent class browser
for COM? I'm looking for something that will allow me to move around the
class hierarchy freely? It doesn't have to be a free tool: I don't mind
paying. But the one thing I don't want to do is buy a tool just to find
out that it doesn't do what I need.

regards,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan



More information about the Python-list mailing list