An explanation of how to set up a python development environment in sublime

巴扎黑
Release: 2017-08-21 14:43:48
Original
1799 people have browsed it

sublime Text has a beautiful user interface and powerful features, such as code thumbnails, Python plug-ins, code snippets, etc. Key bindings, menus and toolbars can also be customized. The main features of Sublime Text include: spell check, bookmarks, complete Python API, Goto function, 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" }
Copy after login

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.

Online recommended plug-in:

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 An explanation of how to set up a python development environment in sublime. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!