prevent the REPL from closing (interactive mode):
- In your packages, open SublimeREPL\config\Python\Main.sublime-menu.
- Find the part that contains id: repl_python_run.
- Under args/cmd, add -i. That's it.
For reference, mine looks like the following:
{"command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "d",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["C:/Python34/python", "-u", "-i", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
}
"To execute file with sublimerepl go to Tools > SublimeREPL > Python > Python RUN current file
or create new build:
Tools > Build System > New build system
enter:
{
"target": "run_existing_window_command",
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
You can now change your build system to whatever you named it when saving and pressing CTRL + B will execute the current file in SublimeREPL tab with stdin working."