Declaring COM-interfaces in Python?

Reini Urban rurban at xarch.tu-graz.ac.at
Thu Dec 16 18:49:43 EST 1999


Marc Battyani wrote:
>Reini Urban <rurban at xarch.tu-graz.ac.at> wrote in message
>news:3856bffe.121727274 at judy...
>
>> I would like to have user-defined callbacks for example.
>> i.e. controlable OLE controls, where you can add events (hard) and
>> IDispatch functionality, methods and props, (simple) at run-time.
>>
>> Currently I'm trying to do that in LISP (we can do that in lisp, even
>> with fast vtables), but perl or pythonwin look also promising. The
>> static rest of the croud (VB, java, C, C++, Delphi) would have to stand
>> back then.
>
>What Lisp are you using ?
>Don't forget to tell us about this in comp.lang.lisp when it works...

any. 
no in fact Corman Common Lisp because it doesn't has it yet. And it is
by far the simpliest to start with Corman Lisp.

I'm not sure for ACL but I suspect that franz already supports similar
functionality. Then also for my own AutoLISP FFI (alpha) and maybe later
for Visual Lisp because those guys will need (and pay for it) at most :)

No PropertyPages and Persistency, so no full OLE control, but almost a
control. Events are the big deal which pays.

Also for the perl Win32::OLE module but this is Jan Dubois' field then.
For the perl OLE server there're no sources. (ActiveState development
sponsored by MS) With pythin it would be much easier than for perl is my
guess. Marc has a lot of experience there. 
In fact I mostly use python's OLE typeinfo browser.

For perl/python we would need some sort of very complicated
cross-platform trampoline there, but Bruno Haible already has that in
the clisp sources. (creating assembler functions on the fly, even
closures)

With IDispatch it's quite easy, for vtables a little bit harder, but
much faster then.

My worst problem with IDispatch is probably to persuade the automation
client to read/update the typeinfo for those dynamic
objects/methods/events dynamically. Haven't checked that yet, but all
the work would be meaningless if "some" clients will be too stupid.
(python, perl and others could be patched, but the mass...)
--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html



More information about the Python-list mailing list