SublimeLinter/SublimeLinter — pull request #558 by ShawnFumo (2013-09-01 04:20:40+00:00)
Title: Allow customizing python version so 2.7+ features aren't marked as syntax errors

Added a new python_path preference to specify the location of a particular python version. If left as an empty string, it continues to use Sublime's built-in 2.6 version of Python.

When given a real path, it calls out to this version using Popen (with stdin and stdout both piped). It sends a small amount of wrapper code which calls the main pyflakes_check functionality. Because of the need to access that pyflakes_check code and work with the custom error classes (and not have dependencies on the sublime module which an external Python wouldn't have access to), some code was moved out to python_extra.py.

After running the check, the wrapper code pickles any resulting error classes and sends them to stdout. They are then unpickled and returned, so the existing error parsing code didn't have to be changed.

Tested on OSX and Windows Vista with Python 2.7.3 and 2.7.5 respectively. An easy way to see it working is to open a file with a dict comprehension and add the preference to user preferences. It should stop being marked as a syntax error as soon as the next check happens.

Fixes [Issue #13](https://github.com/SublimeLinter/SublimeLinter/issues/13)