如果是想要交互模式,安装sublimeREPL就好了,如果是想通过cmd运行py脚本那种模式,需要配置build-system
{
"encoding": "utf-8",
"working_dir": "$file_path",
"shell_cmd": "python -u \"$file\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"variants":
[
{
"name": "Run",
"shell_cmd": "start cmd /c \"python -u \"$file\" & pause\"",
}
]
}
保存即可