sublime配置python-rpel,从崇高的文本设置sublimerepl的python路径?

I use python portable along with sublime portable of a memory stick and decided to install sublime REPL however when trying to use python portable as the build path for sublimerepl it does not specify it.

To put it simply I can't specify the sublimerepl python path like I can with straight sublime text!

I have tried adding the following into 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 have 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"],

within 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

解决方案

Is it possible you're changing the wrong line of code in /Packages/SublimeREPL/config/Python/Main.sublime-menu? If you wish to run REPL on 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"}

}

is what the modified section should look like. (It appears you might be modifying the command which opens the interpreter in interactive mode as opposed to running the current file).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值