From 411f648064d8ec87eed499ed61870cd291b366b5 Mon Sep 17 00:00:00 2001 From: hugovk Date: Sat, 5 Apr 2014 22:06:52 +0300 Subject: [PATCH] Py3 print (and pep8) --- examples/show_artist.py | 2 -- examples/show_track_info.py | 1 - examples/tracks.py | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/show_artist.py b/examples/show_artist.py index b07186a..bba54e7 100644 --- a/examples/show_artist.py +++ b/examples/show_artist.py @@ -9,8 +9,6 @@ if len(sys.argv) > 1: else: urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu' - sp = spotipy.Spotify() artist = sp.artist(urn) pprint.pprint(artist) - diff --git a/examples/show_track_info.py b/examples/show_track_info.py index 4a720ba..b286c0d 100644 --- a/examples/show_track_info.py +++ b/examples/show_track_info.py @@ -12,4 +12,3 @@ else: sp = spotipy.Spotify() track = sp.track(urn) pprint.pprint(track) - diff --git a/examples/tracks.py b/examples/tracks.py index 10883c8..3c520f2 100644 --- a/examples/tracks.py +++ b/examples/tracks.py @@ -1,5 +1,6 @@ # shows tracks for the given artist +from __future__ import print_function import spotipy import sys sp = spotipy.Spotify() @@ -8,5 +9,4 @@ if len(sys.argv) > 1: artist_name = ' '.join(sys.argv[1:]) tracks = sp.search(q=artist_name, limit=20) for i, t in enumerate(tracks['tracks']): - print ' ', i, t['name'] - + print(' ', i, t['name'])