def list_albums(args): imgsrc = ImgSrc(username, password) albums = imgsrc.get_albums() for i in albums: #print i.name if i.photos and i.modified and i.name: print "%s : %s (%s; %s)" % (i.id, i.name, i.photos, i.modified) else: print "%s : <no data>" % (i.id)