danthedeckie/display_colors — pull request #2 by vrypan (2013-10-12 21:41:47+00:00)
Title: Many changes

1. use env to determine python bin (it might be in a different location)
2. docopt to parse command line arguments (more readable code)
3. preserve existing bits in attribute when setting color.
4. ignore xattribute bits not used for color when getting color

Regarding 3 and 4: I noticed I had a file where the color was set to 9, and Finder was showing it as blue. The reason is that the color is obviously defined by bits 1-3, and my file had bit0 set. So I rewrote get() and set() to ignore the rest of the bits and preserve them in set().