如何在sublime3中直接运行python

来源:互联网 发布:js地图效果 点击省份 编辑:程序博客网 时间:2024/05/16 12:56

from http://www.cnblogs.com/muzizongheng/p/3172998.html

Sublime Text: [Decode error - output not utf-8]

今天编译Python时, 输出窗口信息出现:
[Decode error - output not utf-8]
[Decode error - output not utf-8]

发现是print不支持中文字符的输出, 需要修改python的build的setting, 打开Python.sublime-build,
修改为:

{
     "cmd": ["C:/Python33/python.exe", "-u", "$file"],
     "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
     "selector": "source.python"
     "encoding": "cp936"
}


其它参考:

Sublime Text2里面有个tools --》build

可能之前我已经装过一些插件了,所以这样就直接可以运行了。

http://www.oschina.net/question/233658_43978


0 0
原创粉丝点击