安装工具
安装python2.7
安装wxPython
安装SublimeText插件
使用Package Control安装插件
- 按下Ctrl+Shift+P,调出命令面板
- 输入install调出Install Package选项回车,如图:
- 分别输入SublimeCodeIntel和SublimeREPL,安装对应插件
修改SublimeCodeIntel配置
- 点击Preferences->SublimeCodeIntel->Settings - User,如下图:
- 输入以下内容:
1
2
3
4
5
6
7
8
9
10
11
12
13{
"Python": {
"python":"C:/Python27/python.exe",
"pythonExtraPaths":
[
"C:/Python27",
"C:/Python27/DLLs",
"C:/Python27/Lib",
"C:/Python27/Lib/lib-tk",
"C:/Python27/Lib/site-packages"
]
}
}
配置SublimeREPL快捷键
- 点击Preferences->Key Bindings->Settings - User,如下图:
- 在文件Default (Windows).sublime-keymap中加入以下配置,f5为快捷键,根据个人喜好定制
1
2
3
4
5
6
7
8{ "keys": ["f5"],
"caption": "SublimeREPL: Python",
"command": "run_existing_window_command", "args":
{
"id": "repl_python_run",
"file":"config/Python/Main.sublime-menu"
}
}
Build System 配置
该配置请参考以下链接
使用SublimeText 作为Python 的开发环境