Sublime Text 3 Create a comfortable tool (run Python directly) __python

Source: Internet
Author: User
Tags sublime text


1:package contro



L Press CTRL + ' (number 1 on the Left, TAB key above), and then enter the code, carriage return:





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())
Restart Sublime Text.





In a later installation, press Ctrl+shift+p to open the command line mode, enter the Install Package keyword, and then click the first item in the Drop-down menu that appears automatically: Package control:install Package.



2. ConvertToUTF8



Solve the Chinese garbled problem.



The page that appears after installing: namely ConvertToUTF8 introduction 3.SublimeREPL






This code has no way to make interactive input in sublime.



Will complain:



Traceback (most recent call last): A = Raw_input ()
Eoferror:eof when reading a line



This makes people really uncomfortable ...



Solution:
First install the SUBLIMEREPL plugin



And then



Insert the following code in Preferences > Key Buildings-user


    {"Keys": ["Alt+q"], "command": "Repl_open", 
                 "caption": "Python",
                 "mnemonic": "P",
                 "args": {
                 "type": " Subprocess ",
                 " encoding ":" UTF8 ","
                 cmd ": [" Python "," I ","-U "," $file "],
                 " CWD ":" $file _path ",
                 " Syntax ":" Packages/python/python.tmlanguage ","
                 external_id ":" Python "
                 } 
    }





Then ALT + Q can run ...









4.Xdebug






When you start programming for a while, you will need to debug the skills, then the basic use in the sublime is Xdebug



First install Xdebug search and then install it.









And then you can follow his key prompts to debug it.

























Not to be continued.





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.