views:

36

answers:

2

Is there a way to serve up a Python dictionary to a compatible type in Visual Basic 6 using win32com?

+1  A: 

Have you had a look at ActiveState's products? ActivePython (pyWin32com in particular) is what a fair few fairly strong applications use to bridge Python front-ends and COM based architectures. I've used it extensively insofar, and while handling of COM objects isn't as snappy as it might be in one of MS stillborn languages, it's actually pretty solid.

ThE_JacO
A: 

I shudder to think of the requirements for this project. I feel sorry for you already.

Since there is no dictionary type in COM, my guess is that you'll have to pass it out as two SAFEARRAYS and join it back together inside VB. That's the approach I would take.

I found this helpful, especially the second half: http://oreilly.com/catalog/pythonwin32/chapter/ch12.html

And then this article on working with COM datatypes in VB: http://theunknownuser.com/code/COMObjectsC.html

Aaron D