PythonWin repeatedly crashing on trying to create COM object

Jeff Shannon jeff at ccvcorp.com
Wed Feb 27 18:49:44 EST 2002


pj wrote:

> Greetings
>
> I use python to do some COM scripting on my windows 2000 (SR2) box. It
> was working well.. but it once crashed once.
>
> Then it just keeps crashing on
>
>     session = win32com.client.dynamic.Dispatch("Lotus.NotesSession.1")
>
> I just cant seem to get past this point.

What exactly does "crashing" mean?  Are you getting any error messages?
Does Lotus work properly when *not* accessed through COM?  Can you
instantiate any *other* COM objects?

Btw, you can probably eliminate the 'dynamic' portion, and simply use
win32com.client.Dispatch().  That will attempt to use a type library to
speed up access, if one is available, and will default to the purely
dynamic dispatch if one isn't available.  The only time you need to
specify 'dynamic', is if you really must *force* purely dynamic dispatch
even in the presence of a type library.  (And if you don't have a clue
what the difference is between purely dynamic dispatch and dispatch
through a type library is, then odds are that you're better off allowing
the type library to be used. :) )

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list