Python COM: Automatic wrap/unwrap?

Discussion in 'Python' started by Greg Ewing, Nov 8, 2008.

  1. Greg Ewing

    Greg Ewing Guest

    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
     
    Greg Ewing, Nov 8, 2008
    #1
    1. Advertising

  2. Greg Ewing

    Larry Bates Guest

    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
     
    Larry Bates, Nov 9, 2008
    #2
    1. Advertising

  3. Greg Ewing

    greg Guest

    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
     
    greg, Nov 10, 2008
    #3
  4. Greg Ewing

    Tim Golden Guest

    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
     
    Tim Golden, Nov 10, 2008
    #4
  5. Greg Ewing

    Paul Rudin Guest

    Tim Golden <> 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.
     
    Paul Rudin, Nov 10, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary

    Cipher.unwrap

    Gary, Aug 8, 2003, in forum: Java
    Replies:
    0
    Views:
    1,237
  2. Aaron Fude

    To wrap or not to wrap?

    Aaron Fude, May 8, 2008, in forum: Java
    Replies:
    12
    Views:
    743
    Chronic Philharmonic
    May 10, 2008
  3. vunet
    Replies:
    0
    Views:
    1,680
    vunet
    Mar 3, 2009
  4. sdeveloper11
    Replies:
    0
    Views:
    508
    sdeveloper11
    Mar 29, 2011
  5. Art Werschulz

    Text::Wrap::wrap difference

    Art Werschulz, Sep 22, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    276
    Art Werschulz
    Sep 22, 2003
Loading...

Share This Page