Reputation: 1655
Ok this is a pretty simple question. I am new to Python and have been using JES up to this point. I just downloaded Sublime 2 and love it. But in JES there was a command that would open your code in the editor in the command console (load program). I know how to open the command console (ctrl `), but is there a way other than copying and pasting to get the code into the command console?
Upvotes: 0
Views: 60
Reputation: 102852
The Ctrl` console in ST2 uses the internal version of Python that comes with the program, Python 2.6, not the system version(s) you may have installed yourself. It's fine for some stuff, but it is outdated, and there is no (easy/intended) way to install third-party modules.
SublimeREPL
is what you need. It supports Python 2 and 3 (including IPython), as well as a bunch of other languages if you're a polyglot. It basically runs a Python interpreter in another tab, which you can interact with directly, just like at the command line or via IDLE, and you can also send selected text, files, lines, or blocks (functions/classes) to the running REPL. It is available through Package Control, which you should install anyway, if you haven't come across it yet.
If up to this point you've just used JES and haven't installed a version of Python from python.org then you'll want to do that before installing SublimeREPL.
Upvotes: 1