visualstudiopython_Visual Studio Code的Python扩展

Python extension for Visual Studio Code

A Visual Studio Code extension with rich support for the Python language (for all actively supported versions of the language: 2.7, >=3.5), including features such as IntelliSense, linting, debugging, code navigation, code formatting, Jupyter notebook support, refactoring, variable explorer, test explorer, snippets, and more!

Quick start

Step 1. Install a supported version of Python on your system (note: that the system install of Python on macOS is not supported).

Step 2. Install the Python extension for Visual Studio Code.

Step 3. Open or create a Python file and start coding!

Set up your environment

Select your Python interpreter by clicking on the status bar InterpreterSelectionZoom.gif

Configure the debugger through the Debug Activity Bar ConfigureDebugger.gif

Configure tests by running the Configure Tests command ConfigureTests.gif

Jupyter Notebook quick start

Open or create a Jupyter Notebook file (.ipynb) and start coding in our Notebook Editor! OpenOrCreateNotebook.gif

For more information you can:

Follow our Python tutorial with step-by-step instructions for building a simple app.

Check out the Python documentation on the VS Code site for general information about using the extension.

Check out the Jupyter Notebook documentation on the VS Code site for information about using Jupyter Notebooks in VS Code.

Useful commands

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:

Command

Description

Python: Select Interpreter

Switch between Python interpreters, versions, and environments.

Python: Start REPL

Start an interactive Python REPL using the selected interpreter in the VS Code terminal.

Python: Run Python File in Terminal

Runs the active Python file in the VS Code terminal. You can also run a Python file by right-clicking on the file and selecting Run Python File in Terminal.

Python: Select Linter

Switch from Pylint to Flake8 or other supported linters.

Format Document

Formats code using the provided formatter in the settings.json file.

Python: Configure Tests

Select a test framework and configure it to display the Test Explorer.

To see all available Python commands, open the Command Palette and type Python.

Feature details

Learn more about the rich features of the Python extension:

IntelliSense: Edit your code with auto-completion, code navigation, syntax checking and more

Linting: Get additional code analysis with Pylint, Flake8 and more

Code formatting: Format your code with black, autopep or yapf

Debugging: Debug your Python scripts, web apps, remote or multi-threaded processes

Testing: Run and debug tests through the Test Explorer with unittest, pytest or nose

Jupyter Notebooks: Create and edit Jupyter Notebooks, add and run code cells, render plots, visualize variables through the variable explorer, visualize dataframes with the data viewer, and more

Environments: Automatically activate and switch between virtualenv, venv, pipenv, conda and pyenv environments

Refactoring: Restructure your Python code with variable extraction, method extraction and import sorting

Supported locales

The extension is available in multiple languages: de, en, es, fa, fr, it, ja, ko-kr, nl, pl, pt-br, ru, tr, zh-cn, zh-tw

Questions, issues, feature requests, and contributions

If you have a question about how to accomplish something with the extension, please ask on Stack Overflow

If you come across a problem with the extension, please file an issue

Contributions are always welcome! Please see our contributing guide for more details

Any and all feedback is appreciated and welcome!

If someone has already filed an issue that encompasses your feedback, please leave a

👍/

👎 reaction on the issue

Otherwise please file a new issue

If you're interested in the development of the extension, you can read about our development process

Data and telemetry

The Microsoft Python Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. This extension respects the telemetry.enableTelemetry setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
vscode插件合集,05月最新,包括以下插件: bibhasdn.django-html-1.2.0 bibhasdn.django-snippets-1.1.0 bitlang.cobol-1.7.8 christian-kohler.npm-intellisense-1.3.0 christian-kohler.path-intellisense-1.4.2 chrmarti.regex-0.2.0 CoenraadS.bracket-pair-colorizer-1.0.37 daltonjorge.scala-0.0.5 danields761.dracula-theme-from-intellij-pythoned-0.1.4 DavidAnson.vscode-markdownlint-0.17.0 dbaeumer.vscode-eslint-1.4.10 donjayamanne.jupyter-1.1.4 donjayamanne.python-extension-pack-1.0.1 DotJoshJohnson.xml-1.9.2 DotJoshJohnson.xml-2.0.0 eg2.vscode-npm-script-0.3.4 eriklynd.json-tools-1.0.2 fisheva.eva-theme-0.3.1 formulahendry.code-runner-0.9.3 formulahendry.terminal-0.0.10 gerane.theme-druid-0.0.2 GrapeCity.gc-excelviewer-2.0.21 humao.rest-client-0.18.4 humy2833.ftp-simple-0.6.3 Ikuyadeu.r-0.5.9 Ikuyadeu.r-lsp-0.0.7 itryapitsin.scala-0.1.7 itryapitsin.scalasnippets-0.1.7 jasonnutter.search-node-modules-1.3.0 jithurjacob.nbpreviewer-1.0.0 josephtbradley.hive-sql-0.0.2 kalitaalexey.vscode-rust-0.4.2 kondratiev.sshextension-0.2.1 luqimin.forgive-green-0.2.1 magicstack.magicpython-1.0.12 mohsen1.prettify-json-0.0.3 mooman219.rust-assist-0.2.0 ms-python.anaconda-extension-pack-1.0.0 ms-python.python-2018.4.0 ms-toolsai.vscode-ai-0.1.8 ms-vscode.go-0.6.80 mtxr.sqltools-0.13.0 PKief.material-icon-theme-3.4.0 qub.qub-xml-vscode-1.2.8 redhat.java-0.25.0 redhat.vscode-yaml-0.0.12 rust-lang.rust-0.4.3 rust-lang.rust-0.4.4 scala-lang.scala-0.1.2 sensourceinc.vscode-sql-beautify-0.0.4 truman.autocomplate-shell-0.1.1 vahidk.tensorflow-snippets-0.3.3 vscjava.vscode-java-debug-0.9.0 vscjava.vscode-java-pack-0.3.0 vscjava.vscode-java-test-0.6.1 vscjava.vscode-maven-0.8.0 waderyan.nodejs-extension-pack-0.1.9 wholroyd.jinja-0.0.8 xabikos.javascriptsnippets-1.6.0 yzhang.markdown-all-in-one-1.3.0 yzhang.markdown-all-in-one-1.4.0 ZakCodes.rust-snippets-0.0.1 zhuangtongfa.material-theme-2.13.5 zhuangtongfa.material-theme-2.13.6

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值