[Pythonmac-SIG] obtaining versions of application bundles

has hengist.podd at virgin.net
Fri Oct 22 16:16:16 CEST 2004


Brad Allen wrote:

>>I'm looking for a good way to obtain the versions of Mac OS X  application
>>bundles. The osascript/Applescript approach has serious problems,  because
>>sometimes the Finder isn't running.

I'd like to suggest using System Events which should always be 
available on OS 10.2 onward, but at least on the version I'm using, 
SE 1.2, several of the file class's properties appear to be broken 
including version and product version. Standard Additions doesn't 
look a better prospect; while the dictionary says it one of its 
return values is a version number, in practice SA 1.9.1 doesn't seem 
to do this. I don't know if the situation's any better under 10.3, 
but so far it's not exactly promising.


>Finding an application if you don't know its path more or less 
>requires  using LaunchServices.. which isn't included with Python 
>2.3 (but I  think you can get it from Jack's PackageManager 
>repository, and I  believe appscript may also install it).

For the benefit of one-stop shoppers who don't already have it, 
there's a distutils-based LS package provided as a separate install 
on my appscript page. Jack's copy may be more up to date though, I 
dunno.

has
-- 
http://freespace.virgin.net/hamish.sanderson/


More information about the Pythonmac-SIG mailing list