Skip to content

Instantly share code, notes, and snippets.

@Black-Milk
Last active October 22, 2018 11:51
Show Gist options
  • Save Black-Milk/9361768 to your computer and use it in GitHub Desktop.
Save Black-Milk/9361768 to your computer and use it in GitHub Desktop.
Sublime REPL settings for Anaconda distribution of Python. Included are REPL settings for python and ipython running under python 2.7 and python 3.3. Be sure to provide the appropriate path to your Anaconda Python 2.7 and Python 3.3 executables within the lines that start with "cmd" .
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "r",
"id": "SublimeREPL",
"children":
[
{
"caption": "Python",
"id": "Python",
"children":[
{
"command": "repl_open",
"caption": "Python 2.7 - Anaconda",
"id": "repl_python",
"mnemonic": "p",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["/anaconda/bin/python2.7", "-i", "-u"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
},
{
"command": "repl_open",
"caption": "Python 3.3 - Anaconda",
"id": "repl_python",
"mnemonic": "p",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["/anaconda/envs/py3k/bin/python3.3", "-i", "-u"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
},
{
"command": "repl_open",
"caption": "IPython 2.7 - Anaconda",
"id": "repl_python_ipython",
"mnemonic": "p",
"args": {
"type": "subprocess",
"encoding": "utf8",
"autocomplete_server": true,
"cmd": ["/anaconda/bin/python2.7", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {
"PYTHONIOENCODING": "utf-8",
"SUBLIMEREPL_EDITOR": "$editor"
}
}
},
{
"command": "repl_open",
"caption": "IPython 3.3 - Anaconda",
"id": "repl_python_ipython",
"mnemonic": "p",
"args": {
"type": "subprocess",
"encoding": "utf8",
"autocomplete_server": true,
"cmd": ["/anaconda/envs/py3k/bin/python3.3", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {
"PYTHONIOENCODING": "utf-8",
"SUBLIMEREPL_EDITOR": "$editor"
}
}
}
]
}
]
}]
}
]
@Mac13kW
Copy link

Mac13kW commented Sep 19, 2015

Hi amarting,

If you are on Windows then you need to change the path to your Python executable to something like this:
"cmd": ["C:/Anaconda/python.exe", "-i", "-u"],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment