要先配置好python的环境变量,打开sublime text ,点击tools,然后选择build system,选择new build system,在文件中写入
{ “cmd”: [“D:/Python34/python.exe(ps:你的python安装路径)”, “-u”, “$file”], “file_regex”: “^[ ]File \”(…?)\”, line ([0-9]*)”, “selector”: “source.python” }
修改文件名为:python.sublime-build,直接保存,然后Ctrl+B即可运行
以上就是sublime运行Python代码的快捷键的详细内容,更多请关注php中文网其它相关文章!