Python COM for Linux?
Warren Postma
embed at NOSPAM.geocities.com
Tue Jun 27 09:47:16 EDT 2000
I find callbacks from C to python to be no problem. I use a simple
publish/subscribe event model implemented as a C extension that has a
dictionary with the event names as the keys (strings), and the callbacks as
a list of Python functions. The C code is both portable and elegant, IMHO.
Adding COM just to get callbacks would be ugly for two reasons:
1. You already have TWO sets of primitive types (C builtin variable types,
and Python's native types), why mix in a third?
2. COM on Linux is a fudge, and not a very stable one at that. There is a
COM implementation for Linux but it's not open source, so if you have a
problem, you can't fix it, you're stuck.
Warren
<scoota at my-deja.com> wrote in message news:8ja7gv$687$1 at nnrp1.deja.com...
> Hi,
>
> I'm writing an automation interface for a large system embedding Python
> as the script language. To keep the scripts as easy to write as
> possible (for the end-user) I'm providing a set of extension objects
> written in C++. What I would ideally like is for these objects to fire
> events which are then handled in the Python script. So far I can see
> no platform independent way of doing this except using explicit
> callbacks (which is messier than I would like).
>
> Has anyone any experience in this area?
>
> Scoota
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
More information about the Python-list
mailing list