Sublime Text 3 Python开发环境配置

时间:2021-10-18 02:17:39
1.运行Sublime Text Build 3083 x64 Setup.exe,默认安装在C:\Program Files,启动后在帮助菜单输入注册码
2.安装Package Control,打开Sublime Text3 按Ctrl+~ 在输入框内贴入:
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); 
urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 
'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
回车,执行完后重启Sublime Text3 
3.安装自动格式化代码工具.打开Sublime Text3,按Ctrl+Shift+P,输入Install Packages,然后输入Python PEP8 Autoformat,安装;
4.安装SVN(按需要),打开Sublime Text3,按Ctrl+Shift+P,输入Install Packages,然后安装TortoiseSVN;
5.配置python运行文件:
Winrar打开C:\Program Files\Sublime Text 3\Packages\Python.sublime-package,找到Python.sublime-build,在"file_regex"后面加入一行,如下:
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"path":"C:/Python27",
保存,退出. 按Ctrl+B就可以运行python了