1.Tools --> Build System --> New Build System
2.删除所有内容
3.复制如下代码进去,保存为 myPython.sublime-build
4. Ctrl + Shift + B, 选择 “myPython-Run"
{
"cmd": ["python","-u","$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"variants":
[
{
"name":"Run",
"shell": true,
"cmd": ["start","cmd","/c", "python $file &echo. & pause"],
"working_dir": "${file_path}",
}
]
}