anishathalye/dotfiles_template — pull request #2 by m45t3r (2014-06-15 06:50:10+00:00)
Title: Check Python binary version

Some distros (like Arch Linux) defaults /usr/bin/python to Python 3
instead of Python 2 (Python 2 is actually /usr/bin/python2). Other
distros links /usr/bin/python to /usr/bin/python2. This is actually
correct, but older distros may not have the Python symlink on
/usr/bin/python2 and instead just have the /usr/bin/python symlink.

So let's make a workaround: checks if /usr/bin/python2 exists. If it
exists, it means that the distro already uses the new, PEP 394
(http://legacy.python.org/dev/peps/pep-0394/) way. If not, the distro
uses the old /usr/bin/python only, and we should use this path.