Exemplo n.º 1
0
def main():
    tracks = get22tracks()
    json = simplejson.dumps( tracks )
    print "Content-Type: application/json"
    print "Content-Length:", len(json)
    print
    print json
Exemplo n.º 2
0
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