msscript & python: problems accessing objects inserted by msscript->AddObject

Svenn-Ivar Svendsen ssvendsen at atmel.com
Tue May 11 05:07:37 EDT 2004


I'm implementing a windows application with generic support for
scripting, and I'm using the microsoft script control (msscript).
For vbscript/jscript I'm happy, but with python I got problems
accessing COM objects that have been inserted in the script runtime by
the msscript->AddObject function. Have anybody had similar problems?

To be more specific the code:

Monitor.Echo(logTxt, output)

where 'Monitor' is a COM object aready inserted by
msscript->AddObject(..) results in a runtime error where the top stack
trace shows:

 File "C:\PROGRA~1\Python23\lib\site-packages\win32comext\axscript\client\pyscript.py",
line 146, in __getattr__
   return self._scriptItem_.subItems[string.lower(attr)].attributeObject
AttributeError: 'NoneType' object has no attribute 'subItems'

Regards,
SIS



More information about the Python-list mailing list