Skip to content
Python extension for Visual Studio Code
TypeScript Python JavaScript HTML Jupyter Notebook CSS
Branch: master
Clone or download
This branch is 9 commits ahead of DonJayamanne:master.

Latest commit

karrtikr Do a one-off transfer of existing values for `python.pythonPath` sett…
…ing to new Interpreter storage if in DeprecatePythonPath experiment (#11053)

* Added functionality

* Added tests to interpreter path service

* Added tests for activation manager

* News entry

* Fix bug

* Correct activation manager tests

* Add tests for the new API method

* Update unit tests
Latest commit 56051b8 Apr 12, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.devcontainer Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
.github Replace spinner with custom icon when downloading MPLS/Insiders build ( Apr 7, 2020
.vscode Add more telemetry around ipywidgets (#11034) Apr 9, 2020
build Update DS perf pipeline (#10963) Apr 10, 2020
data Rename pep8 to pycodestyle. (#6570) Aug 29, 2019
images Updated dscription to add Jupyter Notebook support (#8545) Dec 10, 2019
languages Introduce pip requirements file highlighting Sep 27, 2017
news Do a one-off transfer of existing values for `python.pythonPath` sett… Apr 12, 2020
pythonFiles Run all extension-internal uses of Python "isolated". (#10943) Apr 8, 2020
resources Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
schemas Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
snippets Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
src Do a one-off transfer of existing values for `python.pythonPath` sett… Apr 12, 2020
syntaxes Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
tpn Preparing for release for march (#10477) Mar 9, 2020
types Update ppa type definitions (#11067) Apr 10, 2020
typings Add support for ipywidgets (#10606) Mar 17, 2020
.editorconfig #1228 multi root master (#2) Nov 1, 2017
.eslintrc Format ts code using Prettier (#9359) Jan 2, 2020
.gitattributes Make npm happy in regards to line endings (#357) Dec 6, 2017
.gitignore Update DS perf pipeline (#10963) Apr 10, 2020
.npmrc Make gather an optional component (#9755) Mar 8, 2020
.nvmrc Update node to 12.4.0 (#9424) Jan 8, 2020
.prettierrc.js Support Update Display Data (#10874) Mar 31, 2020
.sonarcloud.properties Add more telemetry around ipywidgets (#11034) Apr 9, 2020
.vscodeignore Add font awesome font and css to our html (#10888) Apr 1, 2020
CHANGELOG.md Release prep updates change logs, tpn, and version (#11029) Apr 9, 2020
CODE_OF_CONDUCT.md Legal stuff to make CELA happy (#5) Nov 2, 2017
CODING_STANDARDS.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
CONTRIBUTING.md Replacing ptvsd with debugpy in remote attach config prompt and contr… Apr 6, 2020
LICENSE Legal stuff to make CELA happy (#5) Nov 2, 2017
PYTHON_INTERACTIVE_TROUBLESHOOTING.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
README.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
SECURITY.md Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
ThirdPartyNotices-Distribution.txt Release prep updates change logs, tpn, and version (#11029) Apr 9, 2020
ThirdPartyNotices-Repository.txt Add font awesome font and css to our html (#10888) Apr 1, 2020
experiments.json Deprecate PythonPath - Part 1 (#11011) Apr 8, 2020
gulpfile.js Force kernel syncing (#10955) Apr 7, 2020
icon.png moved icon Jul 2, 2017
package-lock.json Fix functional tests for ipywidgets and download just chrome b… (#11093) Apr 11, 2020
package.datascience-ui.dependencies.json Remove bootstrap from UI layer (#10922) Apr 2, 2020
package.json Fix functional tests for ipywidgets and download just chrome b… (#11093) Apr 11, 2020
package.nls.de.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.es.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.fa.json Add command translation for Farsi/Persian (#8092) Oct 26, 2019
package.nls.fr.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.hindi.json Added command translations for hindi (#10711) Mar 24, 2020
package.nls.it.json Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
package.nls.ja.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.json Load widget scripts from CDN and/or local python interpreter (#10987) Apr 10, 2020
package.nls.ko-kr.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.nl.json Auto select kernel when starting jupyter (#8914) Dec 9, 2019
package.nls.pl.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.pt-br.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.ru.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.tr.json Prettier Feb 20, 2020
package.nls.zh-cn.json Drop `python.updateSparkLibrary` command (#7279) Sep 20, 2019
package.nls.zh-tw.json Replacing ptvsd with debugpy in remote attach config prompt and contr… Apr 6, 2020
pvsc.code-workspace Remove ui tests (#10215) Feb 20, 2020
requirements.in Update jedi (#9762) Feb 11, 2020
requirements.txt Update jedi (#9762) Feb 11, 2020
tsconfig.datascience-ui.json Fix formatting of json files Feb 25, 2020
tsconfig.extension.json Fix formatting of json files Feb 25, 2020
tsconfig.json Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
tsfmt.json Prettier Feb 20, 2020
tslint.json Run prettier on our yaml, json and md files (#10871) Apr 1, 2020
vscode-python-signing.csproj VS Python analysis engine integration (#1231) Mar 30, 2018

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

Jupyter Notebook quick start

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

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: 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.

You can’t perform that action at this time.