新建python3编译系统,内容如下:
{
"cmd": ["E:/Program Files (x86)/python3.6/anaconda3/pythonw.exe","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"encoding":"cp936"
}
-
"encoding":"cp936"
:解决中文显示问题 -
"E:/Program Files (x86)/python3.6/anaconda3/pythonw.exe"
:Python的安装路径,注意是pythonw.exe
,不是python.exe
。python.exe
也可以,但是运行时会出现黑黑的python.exe
窗口。让人看着很不舒服,选择pythonw.exe
不会出现这个窗口。
修改Sublime快捷键,设置F5为编译运行快捷键,F7为SublimeREPL:Python的快捷键,这个主要用来解决Sublime input交互问题。(SublimeREPL需要自行安装)
[
{ "keys": ["f5"], "command": "build" },
{ "keys": ["f7"], "caption": "SublimeREPL:Python",
"command": "run_existing_window_command", "args":
{
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
},
]