By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,526 Members | 1,618 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,526 IT Pros & Developers. It's quick & easy.

Python COM: Automatic wrap/unwrap?

P: n/a
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
Nov 8 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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
Nov 9 '08 #2

P: n/a
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
Nov 10 '08 #3

P: n/a
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
Nov 10 '08 #4

P: n/a
Tim Golden <ma**@timgolden.me.ukwrites:
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.
Nov 10 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.