I'm using a Mac (OS X 10.10.2), would like to use SublimeText rather than IDLE. My issue is that I want to use Python 3.4 and SublimeText uses the 2.x Python that comes on my Mac.
I've Googled all over and tried and tried to follow guides even on this website, but I'm at a loss since I have very little knowledge of what I'm doing.
All I want is a program that will let me write, run, interact with Python 3.4, and I feel like with some tweaking I can get SublimeText to fit the bill.
EDIT:
Sorry guys I wrote this late the other night after spending hours messing with sublimetext, my brain was gravy.
Anyways I'll try to be more specific. I'm running OS X 10.10.2 with SublimeText2 and SublimeRepl installed. Currently, ST2 is running Python 2, but I want to run 3.4 (which I have installed from python.org) along with SublimeREPL, that way I can fully replace Python IDLE with ST2 for my class.
Quote from the thread linked above:
The first option would be to copy that Main.sublime-menu file into your local user configuration folder, if you already have one there, you will need to merge both contents. Replace all the python calls by python3, and adjust the caption properties to mention Python 3 (e.g. Python 3 - RUN current file).
Now, when you launch the command launcher via Cmd+Shift+P (should be the keyboard shortcut in OSX, right?), then you can type Python 3 and your new commands using the python3 executable should pop up.
Based on this, it seems I need to go into main.sublime-menu
and copy the contents into my "local user configuration folder", but I don't know if this means Preferences > Settings - User
or Preferences > Package Settings > SublimeREPL > Settings - User
Here is my main.sublime-menu
as it sits. What all needs to be changed to python3 as mentioned in the quote above in order for ST2 to use python 3.4?
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "r",
"id": "SublimeREPL",
"children":
[
{"caption": "Python",
"id": "Python",
"children":[
{"command": "repl_open",
"caption": "Python",
"id": "repl_python",
"mnemonic": "p",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python", "-i", "-u"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
},
{"command": "python_virtualenv_repl",
"id": "python_virtualenv_repl",
"caption": "Python - virtualenv"},
{"command": "repl_open",
"caption": "Python - PDB current file",
"id": "repl_python_pdb",
"mnemonic": "d",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python", "-i", "-u", "-m", "pdb", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
},
{"command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "d",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python", "-u", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
},
{"command": "repl_open",
"caption": "Python - IPython",
"id": "repl_python_ipython",
"mnemonic": "p",
"args": {
"type": "subprocess",
"encoding": "utf8",
"autocomplete_server": true,
"cmd": {
"osx": ["python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"],
"linux": ["python", "-u", "${packages}/SublimeREPL/config/Python/ipy_repl.py"],
"windows": ["python", "-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"
}
}
}
]}
]
}]
}
]
I hope this is a little more specific, I'm very new at this and have only the faintest grasp of what the hell I'm doing. Any help is greatly appreciated, if this isn't specific enough let me know. Thanks!