Home > Article > Backend Development > Use sublime to build a python development environment
sublime Text has a beautiful user interface and powerful features, such as code Thumbnails, Python plugins, code snippets, etc. Key bindings, menus and toolbars can also be customized. The main features of Sublime Text include: spell check, bookmarks, full Python API, Goto functionality, instant project switching, multi-selection, multi-window and more.
Step1: Install python and sublime
Step2: Install package control for sublime. For installation, see: Official website
Step3: Configure the installation path
Method 1: The advantage of configuring the Windows Path
is that it can also be run during cmd and is regarded as a system and user-level configuration;
Method 2: Configure sublime's python's sublime_build
Click :Preference -> Browse Packages -> In the python directory, edit the Python.sublime-build file and add the path of the python application:
{ "cmd":["python.exe", "-u", "$file"], "path":"C:/Python27", "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.python" }
At this point, you can use ctrl + b to directly run the current python code.
step4: Install some plug-ins
Installation method:
Ctrl+Shift+P Open the control panel, find Install Package, and press Enter; enter the plug-in name in the pop-up box , press Enter to install. Or follow the plug-in documentation to install it.
Recommended plug-ins on the Internet:
SublimeREPL can be used to run and debug some programs that require interaction.
SublimeCodeIntel can support functions such as code auto-completion and member/method prompts.
SublimeLinter is used for code checking when writing code. It can check whether the Python code meets the requirements of PEP8.
The above is the detailed content of Use sublime to build a python development environment. For more information, please follow other related articles on the PHP Chinese website!