Re. [Pythonmac-SIG] talkingpanda installer - PyObjC experience
hengist.podd at virgin.net
Tue Jun 29 07:00:08 EDT 2004
> I'm also thinking that I should put some more work into aeve,
>because it's much better suited for *receiving* and *sending* apple
>events than appscript is
Yeah, appscript's basically been a one-trick pony to-date, and while
it's very application scripter-friendly it's a bit of a non-starter
as far as application developers are concerned. I've been aware of
this problem for a while and have started breaking it up to allow
other kinds of use.
Early days, so nothing's close to working yet (there's a lot of
dependencies to pull apart, new APIs to create, etc.), but here's an
idea of what I'm doing:
- The Python/AE type converters and AE dispatch code have moved to a
new package, AEM. I've already started work on this. This should
provide a basic interface for AE communication without being tied to
application terminology resources.
- Specifier construction and ApplicationTerminology will also be spun
off into individual concerns.
- Specifier construction needs to take a two-tier approach: the
current, terminology-guided, validating, syntactically-sugared
interface, and a slightly lower-level API for constructing complex
specifiers using AE codes only which will probably end up in AEM.
- 'appscript' itself will end up as 'just another' client to these
services; in its case providing a high-level, AppleScript-like
application scripting interface just as it currently does. (It'll get
all the terminology-based specifier stuff.) So it should continue to
work and feel much as it already does, but will no longer be the only
way to do AEs.
- I've not looked at AE receiving or asynchronous use yet, but should
get round to it eventually. BTW, one of the reasons for putting lots
of input-checking into Specifiers is that it'll make a nice system
for handling incoming Apple events, able to do a lot of user input
validation and intelligent error reporting (unlike Cocoa Scripting,
which is atrocious for this sort of thing). The ultimate goal, of
course, being to create a complete Python Scripting framework (like
appscript, this is something I'll eventually need myself for another
project I'm working on), although that is still a looong way off.
I expect this work to take some months; I'll probably release 0.6.0
in the interim (I've knocked out a few bugs and tidied some code, and
working with Ryan Wilcox to add remote scripting support).
As always, I'm open to suggestions, requests, assistance, etc.
More information about the Pythonmac-SIG