天天看点

Sublime Text 调用cmd运行python(实测有效)

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}",
			}
		]
}
           

转载于:https://www.zhihu.com/question/51061358