Questions on COM Objects scripting

Maan Hamze mmhamze at
Mon Sep 3 19:38:14 CEST 2001

I have couple of questions regarding client scripting against COM objects
using Pythonwin, and using Python in an ActiveScripting setting.  All I need
are hints to direct me in the right direction.
1.   Using PythonWin-
I am controlling a povray modeller program (Breeze Designer) that has a COM
interface in the form of:

import win32com.client
#  This all works fine.  Now we continue with
from win32com.client import pythoncom
# I get the following error"
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
com_error: (-2147221021, 'Operation unavailable', None, None)

Taking into account that the very same thing works fine with something like
"Excel.Application"; what does this error tell me about "Breeze.Scene"?

2.  Using Python ActiveScripting
>From inside the applicatio itself (Breeze Designer) there is a facility to
run Macros with languages with ActiveScripting capabilities including
"Breeze.Scene" is created automatically when Breeze is started.
a macro starts with $Scripting_Language


give me a Python error that Breeze is not defined.  So does Scene.New().
I just can not get Python to communicate with this interface.
If I use
import win32com.client
scene = win32com.client.Dispatch("Breeze.Scene")

The application is crashing with an error in Pythoncom21.dll

Breeze allows by default for VBScript to get the object without further
The question:
I do not know if this is a problem with Breeze OR the way I am doing to get
the object to be used with Python.  maybe:  import win32com.client is not
the way.
If this is not a problem with Breeze, what can we use to communicate with
this object so that Python can be used with it?

More information about the Python-list mailing list