Communicating with MSVC++ via COM: how?
Mark Hammond
mhammond at skippinet.com.au
Sat Jan 10 17:17:28 EST 2004
Eric Brunel wrote:
> This script doesn't work: the call to docs.CloseAll fails with the error:
>
> Traceback (most recent call last):
> File "test.py", line 13, in ?
> docs.CloseAll()
> TypeError: object of type 'int' is not callable
This is because docs.CloseAll is making the call, and returning an int.
This, docs.CloseAll() is attempting to call that int.
It looks very much like you have no makepy support for MSVC built.
Just after the line:
app = win32com.client.Dispatch('MSDev.Application')
Try adding:
app = win32com.client.gencache.EnsureDispatch(app)
That should force makepy, and everything should start working.
Mark
More information about the Python-list
mailing list