Py3 print (and pep8)

This commit is contained in:
hugovk 2014-04-05 22:06:52 +03:00
parent 28443a0739
commit 411f648064
3 changed files with 2 additions and 5 deletions

View File

@ -9,8 +9,6 @@ if len(sys.argv) > 1:
else:
urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu'
sp = spotipy.Spotify()
artist = sp.artist(urn)
pprint.pprint(artist)

View File

@ -12,4 +12,3 @@ else:
sp = spotipy.Spotify()
track = sp.track(urn)
pprint.pprint(track)

View File

@ -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'])