DanNixon / PlayMusicCL

A command line client for Google Play Music
Apache License 2.0
135 stars 21 forks source link

Formatted setup.py for PEP8; Patched GetDeviceID.py for Py3 #36

Closed jwarner112 closed 8 years ago

jwarner112 commented 8 years ago

Hey there!

I wanted to use this but with Python3. I've also never updated for Python2&3 compatibility before, and figured this would be a fun way to spend an evening and learn something new.

DanNixon commented 8 years ago

It looks like the only difference between the version 2 and version 3 code in GetDeviceID.py is the use of raw_input vs input.

This could be done much simpler without duplicating the rest of the code by adding this at the top of the file:

if sys.version_info.major == 3:
    raw_input = input

Then just using `raw_input``in the script.

jwarner112 commented 8 years ago

This is true, though my design choice was deliberate since Py2 and Py3 are definitely not supposed to be compatible. I didn't want to set the precedent of treating the two as logical equivalents. It's ultimately up to you though, cheers!