Configure several versions of Python in Sublime Text 2 with REPL

1

I have two versions of Python and I have REPL in Sublime Text 2 but I only get one version of Python.

How can I do to be able to choose between both versions?

    
asked by Carmen Torralvo 10.03.2016 в 08:44
source

1 answer

1

You're accessing Tools > Build System > New Build System :

And you put the following code (this would be to put version 3 of Python):

{
    "cmd": ["python3", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

You save and you already have a new build.

The code to put any version of Python, is the same but putting the absolute path (both in GNU / Linux and Windows):

{
    "cmd": ["C:\path\to\desired\version\python.exe", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python"
}

In GNU the path would be something like /usr/bin/Python...

    
answered by 20.07.2017 в 18:19