Saddly, I get the same error with :t2 = app('iTunes').sources()[0].playlists()[0].tracks() print len(t2)
Which I think is a more Apples to Apples comparison. I suspect something different is being done in the ScriptingBridge than in appscript. I'll give the pre-release appscript a try and see if there is a difference. -Joe On Thu, Oct 9, 2008 at 8:59 PM, Ned Deily <[EMAIL PROTECTED]> wrote: > In article > <[EMAIL PROTECTED]>, > "Jon Smith" <[EMAIL PROTECTED]> wrote: > > I've been using Appscript and have been incredibly happy with it. However > > I'm having a ton of problems getting the list of tracks from my library. > I > > was assuming the problem was with my library/iTunes itself however I can > get > > the track list with ScriptingBridge. Am I doing something wrong? Why > would > > ScriptingBridge work and AppScript Timeout? Any ideas. > > > > #!/usr/bin/env python > > from ScriptingBridge import * > > from appscript import * > > > > def main(argv=None): > > itunes = > > SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes") > > lib = itunes.sources()[0].playlists()[0] > > tracks = lib.tracks() > > print len(tracks) > > tracks2 = > > > app(u'/Applications/iTunes.app').library_playlists['Library'].file_tracks.get( > > ) > > FWIW, appscript seems to have no problems for me returning a track list > of length 21361. You're not quite doing an Apple-to-app(le)script > comparison, though. I get a somewhat faster response from iTunes if I > construct an appscript reference similar to your SB one: > > app('iTunes').sources()[0].playlists()[0].tracks() > > This is using the pre-release appscript 0.19 with the python.org python > 2.5.2 on 10.5.5 Intel. > > I see your track count is 38447. 2**16 > 38447 > 2**15, so could there > possibly be some overflow problem somewhere? > > -- > Ned Deily, > [EMAIL PROTECTED] > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig >
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig