Sublime Text 3 configuration using Python

Source: Internet
Author: User
Tags sublime text



1. In sublime text of the official website to download, is suitable for their own system version. Website address: HTTPS://WWW.SUBLIMETEXT.COM/3



2. After installation, open in the menu bar: Preferences--->settings (this is the time to write this, the latest version of the current)



3. After opening we will see such two files, a preferences.sublime-settings--default and a preferences.sublime-settings--user



So this user file is the one we're going to edit.



4. Write the configuration information/code in the curly braces of the file, and then save:


 
 
 1 // Settings in here override those in "Default/Preferences.sublime-settings",
 2 // and are overridden in turn by syntax-specific settings.
 3 {
 4 
 5     "python":{
 6         "Python":"D:/Python27/python.exe",
 7         "pythonExtraPaths":
 8         [
 9             "D:/Python27",
10             "D:/Python27/DLLS",
11             "D:/Python27/Lib",
12             "D:/Python27/Lib/site_packages"
13         ]
14     },
15     
16 }


5. After this configuration is complete, the execution ctrl-b should be able to execute, but found no output information, then the following configuration is required



File--->new files, save the name Python.sublime-build (Python can also write other things like My_python)



In the same need to write a section of configuration information/code, Save:


 
1 {
2     "shell_cmd": "d:/python27/python.exe -u \"$file\"",
3     "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
4     "selector": "source.python",
5     "encoding":"cp936"
6 }


6. Execute the Ctrl-b again, it is OK to run normally, and see the output (if you have to have output)



Sublime Text 3 configuration using Python


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.