Returning lists from python COM servers

Olly Smith oliver.smith at
Mon Sep 9 07:40:12 EDT 2002

"Mark Hammond" <mhammond at> wrote in message
news:qFce9.1228$_l1.2030 at
> Olly Smith wrote:
> > uhmmmmm, strangely enough, changing it to
> >
> > ==
> > return [tags,vals]
> > ==
> >
> > on the server side fixed it!
> >
> > Now the question is: WHY!?
> 'cos some of the pythoncom code sucks.  Returning a tuple can trick the
> framework into thinking you are actually trying to return the *real*
> values, as well as the underlying CSCODE in the COM call.  Returning a
> list fixes this.  I need to look into this a little deeper, but fear b/w
> compatibility will screw me.

OK :)

I'll remember to only chuck lists across the COM boundary.  Just out of
interest, are there any other distributed object architectures that are
better supported by Python? (corba, soap, ......)



More information about the Python-list mailing list