Re: [Pythonmac-SIG] iphoto, slow

2005-12-01 Thread has
Gábor Farkas wrote: >i am trying to print out all my photo's names, together with their keywords. >[...] >this code works, but it's TERRIBLY slow :) > >the problem is the parsePhoto function... >those keyword.name(), photo.name(), photo.keywords() calls take nearly a >second to complete... That s

[Pythonmac-SIG] iphoto, slow

2005-12-01 Thread Gábor Farkas
hi, i am trying to print out all my photo's names, together with their keywords. import appscript app = appscript.app('iphoto') def parsePhoto(photo): tags = [keyword.name() for keyword in photo.keywords()] return (photo.name(),tags) for photo in app.photos(): print parsePhoto(