Visual Studio Code--Python

Source: Internet
Author: User



Recorded:






Premise:



Python is installed



Installing the Pthon module in the VSC






Quick Start



Open Console (ctrl+shift+p): Python:select interpreter, select Python Interpreter



Or click Select Python environment below the software









Smart completion: Smart complements work under the Python standard library and packages in the Python environment you set up;









In the software below the terminal, you can add or remove the terminal as needed;









Debugging Tools:









Edit Python



Auto-completion and IntelliSense can work under the current work environment and Python-standard-installed libraries (PIP-installed libraries), and if they are required to work in other packages, You need to put the path of this package into the python.autoComplete.extraPaths in the settings file:


 
 
"python.autoComplete.extraPaths": [
    "C:/Program Files (x86)/Google/google_appengine",
    "C:/Program Files (x86)/Google/google_appengine/lib" ]


Similarly, python.autoComplete.preloadModules settings can be added to common modules in advance:


" Python.autoComplete.preloadModules ": ["numpy""pandas""matplotlib "],


Finally, the Python.autocomplete.addBrackets setting can decide whether to automatically add "()" After the function name when typing the function name;






Refactoring



Extracting variables



To the right of an expression, click the extract variable, the editor will automatically add a variable named newvariablennn, you can change the name;



Extraction method



Ditto



Sort Import Statements



For the import module, the right-order import statement will combine the statement from the same module into a package;






Linting



Linting can cause code syntax and style errors to be highlighted;






Visual Studio Code--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.