Gordon Scott
2006-04-11 23:30:54 UTC
Hi all,
Cany anyone think of a reason why calling win32com.client.Dispatch() would
simply hang when running under py2exe?
I've got a 3rd party object I'm trying to use and my script runs fine when
run from the console. When I build a service exe it simply hangs when
creating the COM object.
I thought there might be a problem with making sure I imported the correct
items, so I switched my code to instantiate the ImageMagick COM object that
I used in a prior project, but that created the COM object just fine when
compiled as a service...
Could this be a problem with threading styles between the exe and the COM
object?
my script is doing something like this
import pythoncom
import win32com.client
import win32com.gen_py
import win32com.gen_py.SMSC
from win32com.client import gencache, constants, Dispatch
pythoncom.CoInitialize()
#tthis works fine...
magick = Dispatch("ImageMagickObject.MagickImage.1")
del(magick)
#exe hangs on this call whereas script runs fine...
myobj = Dispatch("SMSCConnectivitySDK.SMPP.1")
.
.
del(myobj)
pythoncom.CoUninitialize()
Cany anyone think of a reason why calling win32com.client.Dispatch() would
simply hang when running under py2exe?
I've got a 3rd party object I'm trying to use and my script runs fine when
run from the console. When I build a service exe it simply hangs when
creating the COM object.
I thought there might be a problem with making sure I imported the correct
items, so I switched my code to instantiate the ImageMagick COM object that
I used in a prior project, but that created the COM object just fine when
compiled as a service...
Could this be a problem with threading styles between the exe and the COM
object?
my script is doing something like this
import pythoncom
import win32com.client
import win32com.gen_py
import win32com.gen_py.SMSC
from win32com.client import gencache, constants, Dispatch
pythoncom.CoInitialize()
#tthis works fine...
magick = Dispatch("ImageMagickObject.MagickImage.1")
del(magick)
#exe hangs on this call whereas script runs fine...
myobj = Dispatch("SMSCConnectivitySDK.SMPP.1")
.
.
del(myobj)
pythoncom.CoUninitialize()