def main(): tracks = get22tracks() json = simplejson.dumps( tracks ) print "Content-Type: application/json" print "Content-Length:", len(json) print print json
def main(): genres = get22tracks() text = "" for genre in genres: for track in genres[genre]: text += "%s\n" % str(track['url']) print "Content-Type: text/plain" print "Content-Length:", len(text) print print text