[Pythonmac-SIG] Generate OSA Suite in 10.2.3

Bob Ippolito bob at redivi.com
Thu Sep 25 17:06:24 EDT 2003


On Thursday, Sep 25, 2003, at 16:43 America/New_York, Jack Jansen wrote:

>
> On 25-sep-03, at 7:17, Bob Ippolito wrote:
>
>> This is not something you want to use, the OSA support in the 
>> MacPython standard library is extremely difficult to use, what you 
>> want is my aeve package.
>
> Well, well, well.... I know you're pretty proud of aeve, and it 
> definitely has
> a number of advantages over the old stuff, but calling the old stuff 
> "extremely
> difficult to use" is hyperbole. After you've run gensuitemodule 
> they're 99%
> identical in use. And running gensuitemodule is just the press of a 
> button
> (except for the misbehaving applications for which you also have to do 
> extra
> work with aeve, or have you solved that in the mean time?).

I wouldn't say it's 99% identical.  Have you played with aeve yet?

## aeve
 >>> import aeve
 >>> f = aeve.talkto('Finder')
 >>> f.version
u'10.2.1'
 >>> f.desktop.url
u'file://localhost/Users/bob/Desktop/'
 >>> Finder = aeve.Applications.Finder.Finder
 >>> f.get(Finder.version)
u'10.2.1'
 >>> f.get(Finder.desktop)
BaseClass(Type(desk))
 >>> f.get(Finder.desktop).url
u'file://localhost/Users/bob/Desktop/'
 >>> f.get(Finder.desktop.url)
u'file://localhost/Users/bob/Desktop/'

## Existing OSA support
 >>> import Finder
 >>> f = Finder.Finder()
 >>> f.version
Property('vers')
 >>> f.desktop
Property('desk')
 >>> f.desktop.url
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
AttributeError: _Prop_desktop instance has no attribute 'url'
 >>> f.get(f.version)
u'10.2.1'
 >>> f.get(f.desktop)
Property('desk')

.. Honestly, I don't even remember how to get the URL of the desktop 
using the existing OSA support.

> And the old stuff has the advantage that it's standard, so you can ship
> something that uses it to third parties, where for the time being aeve 
> would
> not only need to be installed itself, but it also depends on a number 
> of other
> non-standard packages.

Yeah, but TECManager and LaunchServices should definitely be included 
with MacPython sometime in the future.  Especially TECManager, as it's 
way better at understanding Apple text encodings than the standard 
library is.  Either way, until then, this is easily solved with 
bundlebuilder.

-bob




More information about the Pythonmac-SIG mailing list