Hi,

I'm trying to use python to work with the various ESRI (the GIS  
folks) com libraries. However, I'm running into some difficulties.

  I've run makepy on the type library I'm interested in working with  
and that yields:

...
# This CoClass is known by the name 'esriSystem.AoInitialize.1'
class AoInitialize(CoClassBaseClass): # A CoClass
...


But dispatching to that

 >>> client.Dispatch("esriSystem.AoInitialize.1")
Traceback (most recent call last):
   File "<interactive input>", line 1, in <module>
   File "C:\Python25\Lib\site-packages\win32com\client\__init__.py",  
line 95, in Dispatch
     dispatch, userName = dynamic._GetGoodDispatchAndUserName 
(dispatch,userName,clsctx)
   File "C:\Python25\lib\site-packages\win32com\client\dynamic.py",  
line 98, in _GetGoodDispatchAndUserName
     return (_GetGoodDispatch(IDispatch, clsctx), userName)
   File "C:\Python25\lib\site-packages\win32com\client\dynamic.py",  
line 78, in _GetGoodDispatch
     IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,  
pythoncom.IID_IDispatch)
com_error: (-2147467262, 'No such interface supported', None, None)

I'm assuming that this is because this doesn't implement IDispatch.

The relevant VB code does:

Set m_pAoInitialize = New AoInitialize

Is there any equivalent in win32com (or even ctypes) that I can use  
to get this working or is Python out of the question here?

thanks very much,

Nick



_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to