Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python com wrappers

Reply
Thread Tools

python com wrappers

 
 
Paul Rudin
Guest
Posts: n/a
 
      12-09-2003

I'm having a problem with the python wrappers generated from a type
library.

The symptom is that I get failures to find connections points inside
the wrappers when called from DispatchWithEvents or WithEvents -
e.g. "com_error: (-2147220992, 'CONNECT_E_NOCONNECTION', None, None)"

It seems that the coclass_clsid property of some classes is
incorrect. It seems that when a coclass in the type library has
multiple "[source] dispinterface" it can happen that this coclass can
end up as the one referenced by each of the corresponding
DispatchBaseClass subclasses via the coclass_clsid property, whereas
probably what should happen is that only ones that are default should
be so treated.

But maybe I'm misdiagnosing the problem; has anyone else seen this
and/or know what the problem is?



 
Reply With Quote
 
 
 
 
Paul Rudin
Guest
Posts: n/a
 
      12-09-2003
>>>>> "Paul" == Paul Rudin <(E-Mail Removed)> writes:

> I'm having a problem with the python wrappers generated from a
> type library.


> The symptom is that I get failures to find connections points
> inside the wrappers when called from DispatchWithEvents or
> WithEvents - e.g. "com_error: (-2147220992,
> 'CONNECT_E_NOCONNECTION', None, None)"


> It seems that the coclass_clsid property of some classes is
> incorrect. It seems that when a coclass in the type library has
> multiple "[source] dispinterface" it can happen that this
> coclass can end up as the one referenced by each of the
> corresponding DispatchBaseClass subclasses via the coclass_clsid
> property, whereas probably what should happen is that only ones
> that are default should be so treated.


> But maybe I'm misdiagnosing the problem; has anyone else seen
> this and/or know what the problem is?


To test this I had a quick look at the code that generates the
wrappers. In win32com/client/genpy.py The class Generator has a method
_Build_CoClassChildren. Replacing the line:

dispItem.coclass_clsid = coclass.clsid

with the lines:

if flags & pythoncom.IMPLTYPEFLAG_FDEFAULT:
dispItem.coclass_clsid = coclass.clsid


seems to solve the problem, although perhaps this breaks something
else?

 
Reply With Quote
 
 
 
 
John J. Lee
Guest
Posts: n/a
 
      12-09-2003
Paul Rudin <(E-Mail Removed)> writes:
[...]
> seems to solve the problem, although perhaps this breaks something
> else?


Try posting what you just wrote to the python-win32 list.


John
 
Reply With Quote
 
R.Marquez
Guest
Posts: n/a
 
      12-10-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (John J. Lee) wrote in message news:<(E-Mail Removed)>...
> Paul Rudin <(E-Mail Removed)> writes:
> [...]
> > seems to solve the problem, although perhaps this breaks something
> > else?

>
> Try posting what you just wrote to the python-win32 list.
>
>
> John


John,

Could you provide a pointer to that list? I know of the Mailing Lists
at Source Forge, but they are just a bug reporting one and checkins
one. Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
depikt (gtk-wrappers): Threads, inlining Pixbufs to python code DreiJane Python 0 11-23-2009 02:27 PM
depikt (gtk-wrappers): Threads, inlining Pixbufs to python code DreiJane Python 0 11-23-2009 02:22 PM
depikt (gtk-wrappers): Threads, inlining Pixbufs to python code DreiJane Python 0 11-23-2009 02:12 PM
announce: OraPIG (python wrappers for Oracle) mh@pixar.com Python 0 05-27-2008 07:57 AM
Anyone else using Python OpenSSL Wrappers? Etienne Posthumus Python 0 01-12-2004 09:21 PM



Advertisments