DDE vs. COM for Python Windows apps
kw at codebykevin.com
Sat Aug 6 17:33:13 EDT 2011
I'm developing a Windows version of a Mac/Python app and I'd like to add
a scripting interface to it. On the Mac I do this via Apple Events--this
is an Apple technology that allows applications to drive other
applications and query them for data using a message-passing interface.
Each application defines a suite of commands and/or data objects that it
will invoke, depending on which Apple Event is passed to it; these
commands and data objects are most commonly documented in an AppleScript
API dictionary, though there are other ways to send Apple Events as well.
On Windows, I've found two separate mechanisms that seem to offer what
I'm looking for: Dynamic Data Exchange (DDE) and Component Object Model
(COM). As I understand it, DDE allows data transfer and
command-automation between applications via a lightweight
message-passing interface. COM seems to offer similar functionality,
with a much more complex learning curve.
The main complaint I've seen about DDE is that it is very old. The main
complaint I've seen about COM is that it is very complex and very
brittle. Based on my research, it seems that DDE might be sufficient for
my needs--I want other applications to be able to send commands to my
application and have data returned to them. But I'd like to have a
better understanding of the merits of each.
Can someone summarize the advantages that COM might have over DDE, in a
Code by Kevin
More information about the Python-list