Hexxeh / spotify-websocket-api

Spotify Websocket API is a fully open source Spotify library based on the WebSocket API used in the Spotify Web beta
395 stars 67 forks source link

more pythonic argument parsing in respotify client #19

Closed ajfisher closed 11 years ago

ajfisher commented 11 years ago

Hi there Hexxeh,

I cleaned up the respotify client to use name == "main" as the entrance point and in addition I've also used argparse to grab the arguments off the command line which is the more standard way to do it.

As I'm using argparse I also chucked getpass in there so you don't have to stick the password into your command line history unless you explicitly want to.

I've got some more changes but will package them up appropriately.

Cheers Andrew

ajfisher commented 11 years ago

Just added a very small modification to this that checks the spotify client logged in status correctly so it exits properly when you don't login properly.

Hexxeh commented 11 years ago

Apologies for taking so long to review this, all LGTM.

ajfisher commented 11 years ago

No worries at all. Haven't had time to finish my other mods yet - hopefully this weekend