To use a Scripting.Dictionary, here goes an example code:
>>> from win32com.client import Dispatch
>>> d = Dispatch('Scripting.Dictionary')
>>> d.Add('key1', 'Value1')
>>> d.Add('key2', 2)
>>> d.Add(3, 'Value3')
Just return the object 'd' from your python COM object.
Rodrigo Strauss
On 7/23/06
On Mon, 24 Jul 2006 03:15:30 +0530, "hari haran" <[EMAIL PROTECTED]>
wrote:
>Hi,
>How can I create a COM compatible dictionary.
>
>
There is no such thing. Visual Basic and VC++, for example, have no
native "dictionary" type.
>So The python code has to be modified to return a Com compatible d
Hi,
How can I create a COM compatible dictionary.
So The python code has to be modified to return a Com compatible dict. Is
that right
Should I use Scripting.Dictionary in Python code.
Ay pointers on Creating a COM compatible dictionary will be of help.
Thanks
-Hari
The Python dict object is
The Python dict object is not a compatible COM object, you need to use
a COM compatible dictionary. You can develop one or use the
Scripting.Dictionary:
http://windowssdk.msdn.microsoft.com/en-us/library/x4k5wbx4.aspx
Rodrigo Strauss
On 7/22/06, hari haran <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I
Hi,
I am trying to write a Simple COM using Python. I am trying to use it in VB.
1.
If I return a dict from Python VB throws a COM exception saying that dict
cannot be converted tio COM VARIANT.
2.
This is just a testing. What I am trying to see is to develope UI in VB and
try to use Python as m