thebitguru / play-button-itunes-patch

Play Button iTunes Patch
http://www.thebitguru.com/projects/iTunesPatch
Other
644 stars 19 forks source link

Specify Python version in shebang #13

Closed qwertimus closed 9 years ago

qwertimus commented 9 years ago

On systems with Python 3 installed & set as the default, the script fails like this:

  File "/Users/joshua/Downloads/play-button-itunes-patch-master/edit_rcd_bin.py", line 17
    print "%s rcd_filepath" % sys.argv[0]
                          ^
SyntaxError: invalid syntax

I got around this by slightly changing the shebang to:

#!/usr/bin/env python2

This fixes the problem and allows the script to execute regardless of the default Python (3/2).

Also, kudos, your patch still works on Yosemite for me.

thebitguru commented 9 years ago

Thanks for sharing, @qwertimus. I am working on a GUI app that uses Cocoa to do all this so hopefully this wouldn't be an issue with that.