5

Interestingly, I'm able to execute .py files through any of the Tools -> SublimeREPL -> Python ->* options, except virtualenv, which does nothing, or execnet, which is not applicable, but when I try any of the Tools -> SublimeREPL -> Eval in REPL ->* options, it fails (silently), and when I try the Ctrl+,,f shortcut, I'm told "Cannot find REPL for 'python'". Python is in my path and I can run it from command prompt. What should I look at to fix this?

8

You need to have a REPL open and running before you can use any of the Eval in REPL or Transfer to REPL options, either by menu or shortcut. Once you have one running, you can then interact with it in those ways. In this case, obviously, you would want to have a Python REPL open, but the same rule applies for any language with a REPL.

| improve this answer | |
  • Thanks, that works. Minor follow-up, but Sublime doesn't have syntax highlighting for Racket (only for Lisp), so when I try to send a .rkt file to REPL, it looks for the Lisp REPL (because that's what's doing the syntax highlighting). Is there a way to tell it to use the Racket repl? – Matt G May 17 '14 at 5:01
  • @MattG - well, there's the Racket package from Package Control that adds a source.racket scope to your .rkt files - perhaps that might work? – MattDMo May 17 '14 at 5:16
1

As MattDMo has stated in his answer you need to have a REPL running beforehand.

For those who are new to sublimeREPL and don't know how to launch the REPL and have not read the documentation:

This worked for me in Sublime Text 3:

  1. Run command palette (Ctrl+Shift+P or `Tools > Command Palette...)
  2. Type repl.
  3. All pre-configured REPLs will show up. Choose the REPL for the language you are working on and press enter.

Alternatively you can also run a REPL using the Tools > SublimeREPL menu.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.