COM in Python?

Alex Martelli aleaxit at yahoo.com
Tue Jan 23 07:22:53 EST 2001


"Mitja Semolic" <mitjase at hotmail.com> wrote in message
news:pzdb6.718$6a.35017 at news.siol.net...
> Is there a way to use COM objects in python?

Oh yes -- on Win32 platforms, the win32com package (part of the
win32all extensions, which you can download from ActiveState, or
get already-added to the Active Python build again from the
ActiveState site) offers excellent ways to "talk COM", examples,
etc (get O'Reilly's published book by Hammond and Robinson for
very complete documentation of the Win32 Python API extensions).

COM is THE key way to talk with the system, all sorts of already
installed applications, separate components, etc, etc, in today's
Windows environments.  Python plays *very well* in that arena;
being a Python fan and working in Win32 environments exclusively,
COM is what I use day-in, day-out.


But not all is lost for cross-platform development, either...:

On all platforms, there is some (early) support for XPCOM; this,
too, is an ActiveState project (you'll need to build Mozilla 6
from sources first, then add in the ActiveState stuff, etc; not
a lightweight project, but worth doing if you need to be
cross-platform but with COM-like functionality!).


Alex






More information about the Python-list mailing list