Setting python path for sublimerepl from sublime text?

I use portable python along with an elevated portable device with memory and decided to install an elevated REPL, however, trying to use python portable as the build path for sublimerepl, it does not specify it.

Simply put, I cannot specify the python sublimerepl path as I can, with straight exalted text!

I tried adding the following to SublimeREPL.sublime-settings

"default_extend_env": {"PATH": "{PATH}:C:\\Users\\Andy\\Documents\\_Main\\M-Stick Backups\\08.07.13\\Computing\\Python Portable\\Portable Python 2.7.3.1\\App\\python.exe"},

I also tried changing:

"cmd": ["python", "-i", "-u"],

to

"cmd": ["C:\\Users\\Andy\\Documents\\_Main\\M-Stick Backups\\08.07.13\\Computing\\Python Portable\\Portable Python 2.7.3.1\\App\\python.exe", "-u", "$file"],

in Python / Main.sublime menu

Note in normal sublime I add the following to Python.sublime-build:

{"cmd": ["C:\\Users\\Andy\\Documents\\_Main\\M-Stick Backups\\08.07.13\\Computing\\Python Portable\\Portable Python 2.7.3.1\\App\\python.exe", "-u", "$file"],"file_regex": "^[ ]*Iile \"(...*?)\", line ([0-9]*)","selector": "source.python"}

Any ideas?

Thanks Andrew

+4
source share
1 answer

Is it possible that you are changing the wrong line of code in /Packages/SublimeREPL/config/Python/Main.sublime-menu ? If you want to run REPL in the current file,

 {"command": "repl_open", "caption": "Python - RUN current file", "id": "repl_python_run", "mnemonic": "d", "args": { "type": "subprocess", "encoding": "utf8", "cmd": ["C:\\Users\\Andy\\Documents\\_Main\\M-Stick Backups\\08.07.13\\Computing\\Python Portable\\Portable Python 2.7.3.1\\App\\python.exe", "-u", "$file_basename"], "cwd": "$file_path", "syntax": "Packages/Python/Python.tmLanguage", "external_id": "python", "extend_env": {"PYTHONIOENCODING": "utf-8"} } 

- what the modified section should look like. (It seems you can change the command that opens the interpreter in interactive mode, as opposed to running the current file).

+1
source

Source: https://habr.com/ru/post/1258134/


All Articles