Skip to content
Python extension for Visual Studio Code
Branch: master
Clone or download
Pull request Compare This branch is 19 commits ahead of DonJayamanne:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update links for release plan Apr 24, 2019
.vscode Add python level tests for datascience python files (#5302) Apr 16, 2019
build Upload vsix to artifacts (#5412) Apr 23, 2019
images Update README to include new features (#5297) Apr 16, 2019
languages Introduce pip requirements file highlighting Sep 27, 2017
news remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
pythonFiles fix len error (#5421) Apr 23, 2019
resources Generalize test results service (#4813) Mar 19, 2019
schemas Add 'pip' to conda environment.yml schema (#2120) Aug 1, 2018
snippets Add snippet for `if __name__ == "__main__":` block (#2881) Oct 17, 2018
src Upload vsix to artifacts (#5412) Apr 23, 2019
syntaxes Delete unused test language files (#298) Nov 27, 2017
tpn April 2019 release candidate (#5365) Apr 18, 2019
types Variable Explorer UI cleanup (#5379) Apr 22, 2019
typings Ensure code compiles in strict mode (#4044) Jan 18, 2019
.editorconfig #1228 multi root master (#2) Nov 1, 2017
.eslintrc fix #1276 Pre-commit hooks to ensure code complies with standards (#1277 Oct 12, 2017
.gitattributes Make npm happy in regards to line endings (#357) Dec 6, 2017
.gitignore Reliably end test tasks in Azure Pipelines (#5410) Apr 22, 2019
.npmrc added .npmrc Oct 18, 2016
.nvmrc
.vscodeignore
CHANGELOG.md April 2019 release candidate (#5365) Apr 18, 2019
CODE_OF_CONDUCT.md Legal stuff to make CELA happy (#5) Nov 2, 2017
CODING_STANDARDS.md Mention which style guide takes precedence and import practices Apr 10, 2018
CONTRIBUTING.md Remove section with reference to pvsc-dev-ext.py Apr 18, 2019
LICENSE Legal stuff to make CELA happy (#5) Nov 2, 2017
PYTHON_INTERACTIVE_TROUBLESHOOTING.md Update PYTHON_INTERACTIVE_TROUBLESHOOTING.md (#3385) Nov 17, 2018
README.md specify fully https path to README images (#5307) Apr 16, 2019
ThirdPartyNotices-Distribution.txt Merge march release into master (#5021) Apr 1, 2019
ThirdPartyNotices-Repository.txt Update TPN based on PyPI projects no longer being embedded in the repo ( Dec 12, 2018
coverconfig.json Create localization of strings (#2757) Oct 9, 2018
gulpfile.js Upload vsix to artifacts (#5412) Apr 23, 2019
icon.png moved icon Jul 2, 2017
package-lock.json Update plotly.js version to 1.47.1 in plotly mimetype renderer (#5428) Apr 23, 2019
package.datascience-ui.dependencies.json Add a data grid control and the infrastructure to support it (#4847) Mar 20, 2019
package.json
package.nls.de.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
package.nls.es.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
package.nls.fr.json
package.nls.it.json Fix up the debug config labels and messages. (#5353) Apr 18, 2019
package.nls.ja.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
package.nls.json Fix the flask app name prompt for launch config. (#5409) Apr 23, 2019
package.nls.ko-kr.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
package.nls.nl.json Fix up the debug config labels and messages. (#5353) Apr 18, 2019
package.nls.pl.json New command to run all of file regardless of cells (#4893) Mar 22, 2019
package.nls.pt-br.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
package.nls.ru.json
package.nls.zh-cn.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
package.nls.zh-tw.json remove unexpected trailing commas in JSON files (#5443) Apr 24, 2019
requirements.txt Update ptvsd (#5363) Apr 18, 2019
tsconfig.datascience-ui.json Add support for dataframes into the DataExplorer (#4969) Mar 27, 2019
tsconfig.extension.json
tsconfig.json Update to node 10 (#5203) Apr 12, 2019
tsfmt.json
tslint.json
vscode-python-signing.csproj VS Python analysis engine integration (#1231) Mar 30, 2018
webpack.config.js Add a data grid control and the infrastructure to support it (#4847) Mar 20, 2019
webpack.datascience-ui.config.js Dev/ianhu/variable explorer styles (#5106) Apr 4, 2019

README.md

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

Set up your environment

  • Select your Python interpreter by clicking on the status bar

  • Configure the debugger through the Debug Activity Bar

  • Configure tests by running the Configure Tests command

For more information you can:

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: Define and run code cells, render plots, visualize variables through the variable explorer 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 thanks to external contributors (if you would like to contribute a translation, see the pull request which added Italian): de, en, es, fr, it, ja, ko-kr, pt-br, ru, 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.

You can’t perform that action at this time.