Re: [Pyobjc-dev] Python as an AppleScript Replacement?
Brought to you by:
ronaldoussoren
From: Jack J. <Jac...@or...> - 2003-03-02 20:11:21
|
On zondag, maa 2, 2003, at 17:55 Europe/Amsterdam, Ronald Oussoren wrote: >> Sounds like it does 90% of what I meant. IMHO, it would be more >> elegant to do it all on the fly with a call like >> osa.getApp("Finder"). After all, PyObjC doesn't generate a whole set >> of python modules to implement Cocoa, it does it all dynamically. >> >> I'm just throwing this out as a suggestion BTW. I probably won't have >> the time to actually implement it. I might take a bash at it though. >> Thanks for your help. > > If you want to help out with this I'd suggest asking around on the > macpython list, the subscribers there are more likely to know about > using OSA from Python. I'd say a function like the getApp you propose > would be a usefull addition, but that's from someone that hasn't used > OSA before. It's been on my todo list for ages, but I think I would implement it by running gensuitemodule on the fly and caching the results. Gensuitemodule is old (more than 7 years) and on the hardware of those days Python wasn't up to parsing thee aete/aeut's on the fly. And it's very tricky code, due to OSA's intricate (and largely undocumented) inheritance rules. I'm happy it works, I don't really want to break it. But, of course, if someone else wants to give this a go: be my guest! -- - Jack Jansen <Jac...@or...> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman - |