[Pythonmac-SIG] ANN: aeve 0.0.1 - Pythonic Apple Event support

Bob Ippolito bob at redivi.com
Mon Jul 28 19:19:21 EDT 2003


On Monday, Jul 28, 2003, at 17:57 America/New_York, Jack Jansen wrote:

> Bob,
> I had a fairly quick look at your stuff, and I'm flabbergasted! I'm 
> typing this with gaffer-tape around my head to stop it from 
> exploding!! I haven't installed anything yet (I don't want to fiddle 
> with my machine just before 2.3:-) but I can see lots of potential 
> already.

Good to see that someone noticed, I was wondering when I'd get some 
feedback.. I spent over a week on this stuff.  It started off as "hey, 
why don't I use gensuitemodule to manage my iTunes library" and then it 
turned out into "hey, I never want to use gensuitemodule again, I'm 
going to have to replace it".

>
> How about us two (and maybe any other interested parties, but I can't 
> think of anyone except maybe Donovan) forming a task force, cleaning 
> this stuff up (there's still quite a bit of horrible gensuitemodule in 
> there, it seems:-), coming up with nifty additions 
> (AppleScript->Python conversion, at least of simple statements, should 
> be doable! Hyperlinked documentation based on your html-generation!) 
> and getting that into 2.4? Or actually, there's no reason we couldn't 
> release it earlier, as it doesn't have to break the old stuff (which 
> would then get a depracation warning in 2.4).

Donovan is definitely interested, but he's been too busy (moving, etc.) 
to do much with it.  He has helped me understand what I'm doing though. 
  When he finds a window of time, I'm sure he'll be on board.

There's a lot less horrible gensuitemodule in there than you think.  
Some of the file names are the same, but their code has been changed to 
protect the innocent.

AppleScript->Python conversion is definitely possible, there isn't a 
whole lot of AppleScript you can't parse just by knowing the aetes for 
AppleScript, StandardAdditions, etc.  In fact, without a huge amount of 
effort, the code could probably take a compiled applescript and make 
quite a lot of sense out of it.  That's a good idea, actually, to have 
AppleScript just compile it for you, and dissect what it ended up 
making.

There's only two things I want to do immediately to aeve's codebase:
	(1) optimize the AERegistry to do two level namespace lookup instead 
of three (currently global -> app -> suite, I think could be global -> 
app).  I'm not having performance issues though.
	(2) add support for logic / test / whose stuff.  I just need to find 
some time to stare at some more AEDescs and find the right approach 
(for example, it might be possible to do some really scary but fun 
"currying" of operators).
	(3) add an async mode.  I deemed this too hard to do at the moment, 
but it's very desirable for me to say, integrate the CFRunloop as a 
Twisted reactor and have Apple Events just work with twisted Deferreds 
and stuff.

The attached python code is some *extremely* frightening python code 
that I had written for fun once that would potentially allow something 
like whose to be almost as easy as AppleScript.

-bob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cake.py
Type: application/octet-stream
Size: 7604 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20030728/ca09ad4d/cake.obj
-------------- next part --------------



More information about the Pythonmac-SIG mailing list