Exposing object model in Python?
bkelley at wi.mit.edu
Fri Jun 27 16:37:06 CEST 2003
> "MK" <MK at foo.com> wrote
> Thanks for your input. Apologies for not being clear enough.
> I'm writing a classical desktop application, using wxPython
> and some other libraries. I'm interested to expose its
> object model a la Microsoft's VBA. That is, I want to allow
> my users to tinker with the app, i.e. write their own macros
> in Python in a miniature IDE, within the app. I'd also like to ship
> the program as a standalone app, using py2exe.
First thing, if you don't have Python Programming on Win32 you need to
purchase it post haste.
Second thing - the problem you are going to find is having COM talk to
the wxPython application. wxPython when run, expects to be the main
thread of execution which means that it is slightly difficult for COM to
start and talk to wxPython. I have "solved" this problem using the
using windows registry
to keep track of where
GUI executable is
| Com Server Starts
| GUI and connects
| through sockets
GUI is Threaded and
for commands on the
Note that the COM Server blocks when sending commands. This is mainly
since I don't really understand COM threading. This shouldn't be too
much of a problem though.
More information about the Python-list