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 dict. Is >that right >Should I use Scripting.Dictionary in Python code. > >Ay pointers on Creating a COM compatible dictionary will be of help. > > What are you actually trying to do? If you just want your VB code to be able to do lookups by string, why not just implement Get and Set methods in your Python code and hide the underlying implementation? Let Python keep the dictionary in its most natural and efficient form. It won't be any less efficient; if you return an object which implements a dictionary, the VB code will still have to make COM calls to query it. It IS possible (I believe) to create a Scripting.Dictionary object and return it to VB, but I'm not convinced it is a better solution. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32