passing dictionaries through COM
Stefan Schukat
SSchukat at dspace.de
Fri Jan 11 07:08:34 EST 2002
Hi,
there is no such type as mapping in oleautomation. If you
want to have a mapping type you must pass an object which
behaves like a dictionary. A sample COM server which acts
like a dictionary is in
%PythonRoot%\win32com\servers\dictionary.py
How to wrap Python objects as return values in COM servers could
be in the book of Mark and Andy.
Stefan
> -----Original Message-----
> From: Ken Guest [mailto:kwg at renre-europe.com]
> Sent: Friday, January 11, 2002 12:14 PM
> To: Python List
> Subject: passing dictionaries through COM
>
>
> hi,
> Does anybody know if it is possible to return a dictionary through COM
> to a VB application?
> I have tried a simple return {1: "a", 2: "b"} from my python code and
> get an error raised "Unexpected Python Error: exceptions.TypeError:
> Objects of type 'dictionary' can not be converted to a COM
> VARIANT' and
> was wondering if there is any 'deep magic'/advanced method of
> transferring a dictionary of information to a COM based client.
>
> Any help/advice would be greatly appreciated
>
> --
> The duck quacks.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list