Following up on my earlier reply, here is a script to print out all  
the star ratings:

import plistlib, os
tunes = plistlib.readPlist(os.path.expanduser('/~/Music/iTunes/iTunes  
Music Library.xml'))
for track in tunes.Tracks.values():
     if hasattr(track, 'Rating'):
         print '%s: %d stars' % (track.Name, track.Rating / 20)
     else:
         print '%s: not rated' % track.Name

--Dethe


"...coding isn't the poor handmaiden of design or analysis. Coding is
where your fuzzy, comfortable ideas awaken in the harsh dawn of reality.
It is where you learn what your computer can do. If you stop coding,
you stop learning."     Kent Beck, Smalltalk Best Practice Patterns


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to