iTunes.py is a Python module that interfaces with iTunes on Mac OS. It relies on appscript, an Apple event bridge that allows Python scripts to control scriptable Mac OS X applications.
The following are sample Python scripts that serve each of my needs, calling the iTunes module:
* delete_missing
* list_albums
* list_playlists
* list_album_playlists
* make_album_playlists
* diff_playlists
The following source tarball is available:
http://www.math.columbia.edu/~bayer/Python/iTunes/