FAQ
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?

- Josef

Search Discussions

  • David Fisher at May 10, 2000 at 2:53 am
    ----- 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
  • Robin Becker at May 10, 2000 at 7:06 am

    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?
    I'm fairly sure that vba won't unload any dll even though there are no
    active references to it. I guess that means that imports etc aren't
    refreshed.
    --
    Robin Becker

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 5, '00 at 12:44p
activeMay 10, '00 at 7:06a
posts3
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase