Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python COM: Automatic wrap/unwrap?

Reply
Thread Tools

Python COM: Automatic wrap/unwrap?

 
 
Greg Ewing
Guest
Posts: n/a
 
      11-08-2008
I'm creating a COM server in Python that will have one
main class, with methods that create and return instances
of other classes.

I've found that I need to use win32com.server.util.wrap
and unwrap on these objects when they pass over a COM
connection. This doesn't seem very convenient, especially
for methods that can be called either via COM or internally
from other Python code.

It seems that the basic Python types are wrapped and
unwrapped automatically when needed. Is there some way of
extending this mechanism? Is there a class I can inherit
from, or a magic attribute I can set, or some registration
process I can use, to get instances of my class automatically
wrapped and unwrapped?

--
Greg
 
Reply With Quote
 
 
 
 
Larry Bates
Guest
Posts: n/a
 
      11-09-2008
Greg Ewing wrote:
> I'm creating a COM server in Python that will have one
> main class, with methods that create and return instances
> of other classes.
>
> I've found that I need to use win32com.server.util.wrap
> and unwrap on these objects when they pass over a COM
> connection. This doesn't seem very convenient, especially
> for methods that can be called either via COM or internally
> from other Python code.
>
> It seems that the basic Python types are wrapped and
> unwrapped automatically when needed. Is there some way of
> extending this mechanism? Is there a class I can inherit
> from, or a magic attribute I can set, or some registration
> process I can use, to get instances of my class automatically
> wrapped and unwrapped?
>

You should post this on comp.python.windows as Mark and the other Windows/COM
gurus hang around there a lot.

-Larry
 
Reply With Quote
 
 
 
 
greg
Guest
Posts: n/a
 
      11-10-2008
Larry Bates wrote:

> You should post this on comp.python.windows as Mark and the other
> Windows/COM gurus hang around there a lot.


I can't find any such newsgroup -- are you sure
that's what it's called?

--
Greg
 
Reply With Quote
 
Tim Golden
Guest
Posts: n/a
 
      11-10-2008
greg wrote:
> Larry Bates wrote:
>
>> You should post this on comp.python.windows as Mark and the other
>> Windows/COM gurus hang around there a lot.

>
> I can't find any such newsgroup -- are you sure
> that's what it's called?


I think that's what it's called on gmane (or some other
newsgroup gateway). From my perspective, it's the python-win32
mailing list:

http://mail.python.org/mailman/listinfo/python-win32

TJG
 
Reply With Quote
 
Paul Rudin
Guest
Posts: n/a
 
      11-10-2008
Tim Golden <(E-Mail Removed)> writes:

> greg wrote:
>> Larry Bates wrote:
>>
>>> You should post this on comp.python.windows as Mark and the other
>>> Windows/COM gurus hang around there a lot.

>>
>> I can't find any such newsgroup -- are you sure
>> that's what it's called?

>
> I think that's what it's called on gmane (or some other
> newsgroup gateway).


On gmane it's gmane.comp.python.windows I think.
 
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
boost::python and automatic conversion for const std::string& gabriel.becedillas@gmail.com Python 1 12-21-2006 05:55 PM
Re: flowcharting is automatic for Python via preprocessor barnesc@onid.orst.edu Python 4 08-03-2004 10:45 PM
flowcharting is automatic for Python via preprocessor Rick Hilburger Python 0 07-31-2004 11:17 PM
Automatic build process + automatic NuNit (2 in 1 solution) ASP .Net 1 06-29-2004 04:15 PM
[PEP] auto keyword for automatic objects support in Python Manlio Perillo Python 2 06-23-2004 01:56 PM



Advertisments