Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

win32com.client documentation?

13,426 views
Skip to first unread message

Mark Morss

unread,
Oct 24, 2007, 10:35:46 AM10/24/07
to
I am a unix person, not new to Python, but new to Python programming
on windows. Does anyone know where to find documentation on
win32com.client? I have successfully installed this module and
implemented some example code. But a comprehensive explanation of the
objects and methods available is nowhere to be found. I have been
able to find a somewhat out-of-date O'Reilly book, nothing more.

I want to be able to script the creation of Excel spreadsheets and
Word documents, interract with Access data bases, and so forth.

kyos...@gmail.com

unread,
Oct 24, 2007, 11:13:25 AM10/24/07
to

Actually, the out-of-date book is still very relevant for most
applications. Chun's book, Core Python Programming also has a section
on using Python to manipulate Office documents.

The docs for PyWin32 currently reside here:

http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/win32_modules.html

The com documents specifically can be found here:

http://aspn.activestate.com/ASPN/docs/ActivePython/2.4/pywin32/com.html

As Tim Golden has mentioned before, Pywin32 is bound so closely to the
win32 calls that you can basically just look on MSDN and use the
syntax there in Python, for the most part.

Mike

Matimus

unread,
Oct 24, 2007, 11:30:37 AM10/24/07
to

That book, if you are talking about "Python Programming on Win32" by
Mark Hamond and Andy Robinson, is the best resource that I know of.
There are a few other places for help, and two of those the help files
installed on your computer with win32com and the source code. You may
be able to find other tutorials and such online. What helped me though
was not a better understanding of these packages, but a better
understanding of COM in general. Once I had a fair understanding of
COM I had a much better experience. I found "Inside COM" by Dale
Rogerson to be a good general resource on learning COM, although there
are many books on the subject to choose from. I can't really help you
any more unless you come up with a specific example of what you are
trying to do.

Matt

Colin J. Williams

unread,
Oct 24, 2007, 6:06:05 PM10/24/07
to Mark Morss, pytho...@python.org
You might download and install Mark
Hammond's PythonWin.

Colin W.

Colin J. Williams

unread,
Oct 24, 2007, 6:06:05 PM10/24/07
to pytho...@python.org, pytho...@python.org

Tim Roberts

unread,
Oct 25, 2007, 2:24:04 AM10/25/07
to

(Ummm, win32com.client is PART of Mark Hammond's PythonWin, now called
PyWin32.)
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts

unread,
Oct 25, 2007, 2:28:05 AM10/25/07
to
Mark Morss <mfm...@aep.com> wrote:
>
>I want to be able to script the creation of Excel spreadsheets and
>Word documents, interract with Access data bases, and so forth.

Empirically, the best way to do this (for me, at least) is to Google for
examples. There are a few simple rules to learn on how to map the Visual
Basic and C++ COM examples you typically find into Python equivalents. Once
you've seen them once, it becomes pretty natural.

There are a few more esoteric topics (like indexed properties) that require
more exploration, and the pywin32 mailing list is absolutely invaluable for
those occasions.

0 new messages