[python-win32] Prob w/ win32com under XP (very weird) - addenda

Guy Umbright gumbright at taltrade.com
Fri Apr 11 15:01:15 EDT 2003


A little more fiddling reveals that:

<script snippet>
import win32com.client

pycomhack = win32com.client.Dispatch("myCOMthingy.myCOMthingy")

pycomhack.SetSession("A",4)
</script snippet>

works just fine as a script.  So the core problem here is for some
reason
it doesn't like:

  from win32com.client import Dispatch

in a script anymore.


[====start original message====]

(a little longish, sorry)

I have COM based test harness for a component I am responsible that I
script 
with python, hence win32com.

I recently install WinXP Pro and reinstalled Python 2.2.2 (along with
win32com).  
None of my scripts will work now (but that isn't the weird part...)

All my scripts start with the following:

<script snippet>
  from win32com.client import Dispatch

  pycomhack = Dispatch("myCOMthingy.myCOMthingy")
  :
</script snippet>


Now when I try to run them, I get an error (from the annoying little
'send us the error' dialog)

AppName: python.exe	 AppVer: 0.0.0.0	 ModName: python22.dll
ModVer: 2.2.2150.1011	 Offset: 00039e79


So as a sanity check I went to the command line and into interactive
mode and did:

>> from win32com.client import Dispatch

I get the same crash.  Damn.  OK lets try

>> import win32com.client

Hey that seems OK, lets try again just for laughs:

>> from win32com.client import Dispatch

It works this time! So this sequence works in interactive mode.

>> import win32com.client
>> from win32com.client import Dispatch
>> pycomhack = Dispatch("myCOMthingy.myCOMthingy")
>> pycomhack.SetSession("A",4)

The SetSession call works fine (as do any others).  So I put it into a
script and try it, same error. and if I trim it down, it still dies on
the "from win32com..." line.

Honestly I am not sure where to begin. I know I can build python debug
and run it in the debugger, but I figured I would ask before I resort to
that (though I suspect I will have to).  Does anyone have any ideas of
what to look at before I go there?  Or pehaps someone has experienced
something similar?

All punditry happily accepted.

Thanks
Guy Umbright


This electronic mail message and any attached files contain information intended for the exclusive use of the individual or entity to whom it is addressed and may contain information that is proprietary, privileged, confidential and/or exempt from disclosure under applicable law.  If you are not the intended recipient, you are hereby notified that any viewing, copying, disclosure or distribution of this information may be subject to legal restriction or sanction.  Please notify the sender, by electronic mail or telephone, of any unintended recipients and delete the original message without making any copies.



More information about the Python-win32 mailing list