Andrew Barnert wrote: >In my iTunes scripts, I do this by generating a big >filter: >[...]
Come to think of it, you can simplify the OR test a bit, since AND() and OR() can take more than one argument: itunes = app('iTunes') dids = [66, 67, 68, 69, 70] idfilters = [its.database_ID == did for did in dids] idfilter = idfilters[0] if idfilters[1:]: idfilter = idfilter.OR(*idfilters[1:]) print itunes.playlists[1].tracks.filter(idfilter).name() HTH has -- http://freespace.virgin.net/hamish.sanderson/ _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig