COM + reload()

David Fisher python at rose164.wuh.wustl.edu
Wed May 10 04:53:24 CEST 2000


----- Original Message -----
From: "Josef Dalcolmo" <dalcolmo at mediaone.net>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Friday, May 05, 2000 7:44 AM
Subject: COM + reload()


> I am using Python as a COM client and server for Excel. E.g. I have a
couple
> of buttons in Excel calling some methods in Python, which in turn use COM
to
> read from and write to Excel. Everything works fine, but when I make a
> change in the Python program, no matter in which module, the change is
never
> reflected in the call started by Excel, until I restart the program.
>
> Even when reloading the top level module on every call from Excel, and
> making the changes only in that top level module, the program called by
> Excel never changes, until I restart Excel.
>
> Does anyone know how I can change this behavior, e.g. how I can force the
> changes to take effect?

Have you tried deleting the COM server objects in VBA then reinitializing
it?  I had a problem once where my COM server kept resetting itself, and it
turned out I was letting the server object go out of scope periodically.

Good luck,
David






More information about the Python-list mailing list