[IronPython] COM Object Issue

Zaur Shibzoukhov szport at gmail.com
Mon Oct 27 08:50:36 CET 2008


There is an error in RC 1:

IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.1433
Type "help", "copyright", "credits" or "license" for more information.
>>> import System
>>> wa = System.Activator.CreateInstance(System.Type.GetTypeFromProgID("Word.Application"))
>>> wd = wa.Documents.Add()
>>> wd.Variables.Add("foo")
<System.__ComObject (Variable) object at 0x000000000000002B>
>>> wd.Variables["foo"]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

In IronPython Beta 5 it worked as expected:

IronPython 2.0 Beta (2.0.0.5000) on .NET 2.0.50727.1433
Type "help", "copyright", "credits" or "license" for more information.
>>> import System
>>> wa = System.Activator.CreateInstance(System.Type.GetTypeFromProgID("Word.Application"))
>>> wd = wa.Documents.Add()
>>> wd.Variables.Add("foo")
<System.__ComObject (Variable) object at 0x000000000000002B>
>>> wd.Variables["foo"]
<System.__ComObject (Variable) object at 0x000000000000002C>

Best regards,
Zaur



More information about the Ironpython-users mailing list