FYI,
I created a new projected on Google Code called Pyslimp3 that
interfaces the original SlimDevices SLiMP3 player + remote control
with iTunes using Python and appscript. Although this may be an
esoteric application that only I use, I thought others might be
interested in the iTunesXML module that loads the iTunes XML file and
interacts with iTunes via appscript. You can download the software
using Subversion (sorry, no tarballs yet). The project page is at
http://code.google.com/p/pyslimp3/
Enjoy!
Brad
--
Brad Howes
Group 42
MIT Lincoln Laboratory β’ 244 Wood St. β’ Lexington, MA 02173
Phone: 781.981.5292 β’ Fax: 781.981.3495 β’ Secretary: 781.981.7420
Jan Erik MostrΓΆm wrote:
> I'm trying to learn how to use appscript but I don't understand what
> I'm missing. I want to read photo info from iPhoto and have things
> working ... partly
> [...]
> # set ptitle to date of item 1 of the selection
> # app(u'iPhoto').selection.items[1].date.get()
> print 'Date : ', item.date.get()
> # AttributeError: Unknown property, element or command: 'date'
>
> The problem is the line where I try to get the date info, the first
> commented line is the applescript line I'm trying to translate, the
> second is what ASTranslate tells me, and the third is the error
> message I get.
ASTranslate is wrong here; it should be 'date_' with a trailing
underscore, not 'date'.
In situations where application-defined terms conflict with built-in
terms (i.e. use the same keyword but a different four-char code),
appscript appends an underscore to the application-defined term to
prevent any problems.
There was a known inconsistency in how older versions of appscript
applied these escapes; that has been fixed in the latest appscript and
ASDictionary releases, but I've not had time to update ASTranslate yet.
Meantime, if in doubt, go by the appscript-style dictionary, which you
can export as HTML from ASDictionary or browse via appscript's built-
in help() method (see the appscript manual for details).
HTH
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
On http://www.python.org/download/mac/ we read
> Python comes pre-installed on Mac OS X, but due to Apple's release
> cycle, it's often one or even two years old. The overwhelming
> recommendation of the "MacPython" community is to upgrade your
> Python by downloading and installing a newer version from the Python
> standard release page.
>
> If you are using Mac OS X 10.5, see the Leopard wiki page for
> detailed information.
>
The Leopard wiki page (http://wiki.python.org/moin/MacPython/Leopard)
says
> Python releases have progressed far enough that it may be worth
> installing the current MacPythondistribution, however there may be
> conflicts between MacPython installations and Mac OS X development
> tools, such as problems building PyObjC applications in Xcode. Mac
> OS X 10.5.x (Leopard) comes with the 2.5.1 Python distribution pre-
> installed, with an integrated Python Launcher.app. At the time of
> Leopard's launch, the official release version of Python was also
> 2.5.1. So some users may wish to avoid installing the pythonmac.org
> distribution and use the built-in python.
(EditText (last edited 2009-04-28)
Is this still current? Have the issues been resolved to the point of
being able to unconditionally recommend say v2.5 or 2.5 on OX10.5?
________________________________________________
David Worrall.
- Experimental Polymedia: worrall.avatar.com.au
- Sonification: www.sonifiction.com.au
- Education for Financial Independence: www.mindthemarkets.com.au