从崇高的文本设置sublimerepl的python路径? [英] Setting python path for sublimerepl from sublime text?

查看:156
本文介绍了从崇高的文本设置sublimerepl的python路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将python Portable和记忆棒的Sublime Portable一起使用,并决定安装Sublime REPL,但是当尝试使用python Portable作为Sublimerepl的构建路径时,它没有指定它.

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.

简单地说,我无法像使用纯正的高文本一样指定sublimerepl python路径!

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

我尝试将以下内容添加到SublimeREPL.sublime-settings

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"},

我也尝试过更改:

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

"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"],

在Python/Main.sublime-menu内

within Python/Main.sublime-menu

请注意,在正常的崇高状态下,我将以下内容添加到Python.sublime-build:

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"}

有什么想法吗?

谢谢, 安德鲁

推荐答案

是否有可能在/Packages/SublimeREPL/config/Python/Main.sublime-menu中更改了错误的代码行?如果您希望在当前文件上运行REPL,

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).

这篇关于从崇高的文本设置sublimerepl的python路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆