Sublime Text 3 builds a python development environment

Source: Internet
Author: User
Tags sublime text

I. Preparatory work

1.python python , and install, configure environment variables (computer-Properties-Advanced system settings-add Python installation path in environment variable-path)

2.sublime Text 3 sublimetext3 , and install

Two. Configuring the Python environment for Sublime Text3

1. Install the package Control

Open the console with the shortcut key Ctrl + ' or View > Show console

Then paste the appropriate Python installation code below, or click here

import urllib.request,os,hashlib; h = ' 2915d1851351e5ee549c20394736b442 ' + ' 8bc59f460fa1548d1514676163dafc88 ';PF = ' package control.sublime-package '; IPP =Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); by =urllib.request.urlopen (' http://packagecontrol.io/' + pf.replace (','%20 '). Read (); DH = hashlib.sha256 (by). Hexdigest (); Print (' Errorvalidating download (got%s instead of%s), please try manual install '% (DH, h)) if DH! = H Else Open (Os.path.join (IPP, PF), ' WB '). Write (by)

and press ENTER to wait for the installation to complete

2 Installing the Python plugin with packpage control

Press Ctrl+shift+p to bring up the command panel and enter PCIP to select the first: Install package

Then enter the Python plug-in name and install

A few Python plugins are listed below:

All autocomplete

Sublime Default Auto-completion only focuses on the words of the current file. This plugin expands its AutoComplete word list to all open files.

Sublimecodeintel

Enhanced Auto-completion for some languages, including Python. This plugin also allows you to jump to the definition of the symbol, by holding down ALT and clicking on the symbol. Very convenient.

Sublimerepl

allows you to run the Python interpreter directly from the editing interface.

Gitgutter

in the Groove area of the editor, according to Git, add a small icon to identify whether a row has been inserted, modified, or deleted. In Gitgutter's readme, there are instructions on how to change the color icon to update your color scheme file.

Pylinter

it automatically checks the. py file whenever it is saved and displays the Pylint violation directly in the editing interface. It also has a shortcut to disable the partial pylint check by inserting a #pylint: disables the comment.

Anaconda

is currently the best Python auto complement and syntax hint plugin in Sublime 3, and provides plug-ins in the IDE such as "Jump to Definition", "Find using", "Show Document", "Auto rename".

sidebarenhancements

provides enhanced functionality for the default sidebar. Sublime's sidebar can be paged out using shortcut keys Ctrl+k ctrl+b (Linux, Win), Cmd+k cmd+b (OS X). After installation, you can also open the current file in the browser via the F12 key.

It's enough for me to just press anaconda and sidebarenhancements.

3. Run the Python file

When editing Python code, save it and then run it with sublime text

The operation flow of the above results:

Open Sublime Textb, write Python code print ' Hello,world. ' Click File-save

After saving, press Ctrl+b in the editor to run the program, get the effect

Sublime Text 3 builds a python development environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.