Use Sublime to build a Python development environment and use sublime to build python

Source: Internet
Author: User

Use Sublime to build a Python development environment and use sublime to build python

 

print ('hello world!')

 

 

1. Download python and set the path system environment variable. When you enter python in the command line, the following interface is displayed, indicating that the installation is successful.

Open the sublime sidebar, and choose view> side bar> show side bar ).

Open the sublime console and choose view> show console.

Set the sublime development language to python, view-> Syntax-> Python.

  Configuration parameters, Perferences-> Settings-User, refer to parameter configuration as follows:

{"Font_size": 12, "ignored_packages": ["Vintage"], // set the tab size to 4 "tab_size": 4, // use spaces to replace tab "translate_tabs_to_spaces": true, // Add the row width ruler "rulers": [80,100], // display the blank character "draw_white_space": "all ", // when saving, the blank line at the end of the row is automatically removed. "trim_trailing_white_space_on_save": true, // The line feed "ensure_newline_at_eof_on_save": true "is automatically added. // The default encoding format is DEFA ": UTF-8 "}View Code

You can also configure the spelling check:"spell_check": true,

 

3. Configure necessary plug-ins for python development:

  Generate Package Control InterfaceClick View> Show Console and enter the following code and restart Sublime. If you see package control in Perferences> package settings, the installation is successful.

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 ())View Code

  Plugin installation method: Open Perferences-> package control and enter install. Enter the plug-in to be installed in the input box and press enter to install the plug-in. Alternatively, press ctrl + shift + P to open the input box and enter the name of the plug-in to be installed.

4. Introduction to practical plug-ins:

Anaconda (the strongest Python IDE plug-in, syntax check, etc .)

SublimeREPL

Dayle Rees (color subject)

5. Compile python

In the file directory, create the file test. py and enter:

print ('hello world!')

 

Then, in the current directory, hold shift in the left hand, right-click the right hand, select: Open the command window here, and execute python **. py to output the program.

Appendix (three activation codes are provided ):

-- Begin license -- Andrew Weber Single User License EA7E-855605 813A03DD 5E4AD9E6 6C0EEB94 BC99798F 942194A6 02396E98 E62C9979 4BB979FE 91424C9D A45400BF F6747D88 2FB88078 90F5CC94 1csc92dc 8457107A F151657B 1D22E383 A997F016 42397640 33F41CFC E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D 5CDB7036 E56DE1C0 EFCC0840 492cd3a6 B98FC99C 8FAC73EE D2B95564 df316523 -- End license ---- Begin license -- K-20Single User LicenseEA7E-9401293A099EC1 %33ebf0cf %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% user LicenseEA7E-94028245CB0D8F 09100037 7D1056EB %%%%65758d3b %%%1fc1a2c1 %51b05b5d 2D3C8CFE %22d1422a %37aa8aba %%a09dbd3a 3FE85BBD 69893DBD -- end license --

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.