Re: [python-win32] Dispatches With Events on COM Object

2006-08-09 Thread Mark Hammond
> * The call to Dispatch happens > * The __wrapDispatch is called with an object for dispatch but the > username is None > * The getTypeInfo method throws an pywintypes.com_error which has > the message of (-2147467263, 'Not implemented', None, None) It is that last step wh

Re: [python-win32] Dispatches With Events on COM Object

2006-08-08 Thread Neil Benn
Mark Hammond wrote: >> Ah good point, I put back in the brackets (doh!) and I am now back to >> the previous place: >> >> mod = >> gencache.EnsureModule('{A4818FD5-6479-11D4-8452-00104B92DD56}', 0, >> 1, 0) >> print dir(mod) >> ob = mod.Application() >> print dir(ob) >> objCybio = win32com.client.D

Re: [python-win32] Dispatches With Events on COM Object

2006-08-04 Thread Mark Hammond
> Ah good point, I put back in the brackets (doh!) and I am now back to > the previous place: > > mod = > gencache.EnsureModule('{A4818FD5-6479-11D4-8452-00104B92DD56}', 0, > 1, 0) > print dir(mod) > ob = mod.Application() > print dir(ob) > objCybio = win32com.client.DispatchWithEvents(ob, CybioEve

Re: [python-win32] Dispatches With Events on COM Object

2006-08-04 Thread Neil Benn
Mark Hammond wrote: >> print dir(mod) >> ob = mod.Application >> > > Try adding parens after that line - currently 'ob' is the class, where you > want an instance of the class. > > ob = mod.Application() > > Ah good point, I put back in the brackets (doh!) and I am now back to the previou

Re: [python-win32] Dispatches With Events on COM Object

2006-08-03 Thread Mark Hammond
> print dir(mod) > ob = mod.Application Try adding parens after that line - currently 'ob' is the class, where you want an instance of the class. ob = mod.Application() That may get closer. Mark ___ Python-win32 mailing list Python-win32@python.org h

Re: [python-win32] Dispatches With Events on COM Object

2006-08-03 Thread Neil Benn
Mark Hammond wrote: The problem will be that the object itself doesn't supply the typeinfo necessary to associate the object with the makepy generated class. It should however be possible for you to manually extract a suitable object though. What you need is something like: from win32com.clie

Re: [python-win32] Dispatches With Events on COM Object

2006-08-02 Thread Mark Hammond
> When I run this, I get the following error: > > Traceback (most recent call last): > File "C:\Program > Files\Python24\Lib\site-packages\pythonwin\pywin\framework\scr > iptutils.py", > line 310, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Documents and Settings\benn\D

[python-win32] Dispatches With Events on COM Object

2006-08-02 Thread Neil Benn
Hello, I am trying to use PythonCOM to interact with a provided proprietary COM object. The Object consists of three dispatch interfaces: IApplication IApplicationEvents IDocumentEvents This can be accessed using the CoBaseClass by ProgID 'OpalControl.Applcation' - so far so goo