Dictionary COM object populated with custom COM-objects

Mark Hammond mhammond at skippinet.com.au
Mon May 22 10:30:55 EDT 2000


You can't pass a raw dictionary, as there is no COM type that corresponds
to this.

If it works with a dictionary of strings, it is probably a side-effect of
the sequence-processing the COM package does to process arrays (ie, a
dictionary would qualify as a sequence).

The best you can do is create an enumerator, or a COM object that exposes
the functionality if a dictionary...

.. just like the sample dictionary Greg wrote - check out
win32com\servers\dictionary.py

Mark.

"Sigve Tjora" <sigvetj at stud.ntnu.no> wrote in message
news:3929386F.84404FDB at stud.ntnu.no...
> I have been trying to pass a dictionary from python to Delpi via COM. It
> seems like the supplied "Python.Dictionary" COM object only can be
> populated with strings. Is this true?






More information about the Python-list mailing list