安装
安装sublimetext3 (http://www.sublimetext.com/3)
下载 https://download.sublimetext.com/Sublime%20Text%20Build%203176%20x64%20Setup.exe
安装python
配置自己的build-system
打开到了:xxxx\Sublime Text 3\Packages 路径
创建一个目录为python,或者不创建直接使用User目录,在目录中创建名为 :Python_cmd.sublime-build 的JSON文件构建:
将以下代码放进去,
{ "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\"", } ] }
将编译系统切换到Python_cmd,就可以使用快捷键ctrl + b (ctrl+shift+b选择自定义的编译系统)在命令行中运行python程序了。