TypeScript Python Other
Latest commit 051f2f1 Jul 18, 2018
Permalink
Failed to load latest commit information.
.github Change shortcut from ctrl+enter to shift+enter (#2189) Jul 18, 2018
.mocha-reporter Correct error message in VSTS mocha reporter (#2070) Jun 28, 2018
.vscode WIP: Rename LS to 'Microsoft Python Language Server' (#2122) Jul 12, 2018
images Simplify/touch-up README (#8) Nov 7, 2017
languages Introduce pip requirements file highlighting Sep 27, 2017
news Final release prep (#2190) Jul 18, 2018
pythonFiles Correct unittest discovery for n-depth test source trees (#2066) Jun 28, 2018
resources Remove jupyter functionality in favor of Jupyter extension (#302) Nov 28, 2017
schemas Add schema support for conda's meta.yaml (#291) Nov 27, 2017
snippets Add `pudb` set trace statement to snippets (#370) Jan 8, 2018
src Add two new popups: One to switch to new LS, another to ask for feedb… Jul 18, 2018
syntaxes Delete unused test language files (#298) Nov 27, 2017
typeshed @ 95eff73 Add typeshed submodule and pass it down to LS (#2043) Jun 25, 2018
typings Check the Path environment variable when ext loads (#1982) Jun 18, 2018
.editorconfig #1228 multi root master (#2) Nov 1, 2017
.eslintrc fix #1276 Pre-commit hooks to ensure code complies with standards (#… Oct 12, 2017
.gitattributes Make npm happy in regards to line endings (#357) Dec 6, 2017
.gitignore WIP: Rename LS to 'Microsoft Python Language Server' (#2122) Jul 12, 2018
.gitmodules Add typeshed submodule and pass it down to LS (#2043) Jun 25, 2018
.npmrc added .npmrc Oct 18, 2016
.travis.yml Enable Python 3.7 in Linux (#2082) Jul 12, 2018
.vscodeignore Ignore languageServer files from vsix (#2152) Jul 13, 2018
CHANGELOG.md Final release prep (#2190) Jul 18, 2018
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 - LANGUAGE SERVER.md Update CONTRIBUTING - LANGUAGE SERVER.md (#2161) Jul 18, 2018
CONTRIBUTING.md Drop label to Travis for development build Jul 10, 2018
LICENSE Legal stuff to make CELA happy (#5) Nov 2, 2017
README.md Specify what versions of Python we support Jul 17, 2018
ThirdPartyNotices-Distribution.txt Add Typeshed license Jul 10, 2018
ThirdPartyNotices-Repository.txt TPN updates for 2018.3.0 release (#1196) Mar 26, 2018
coverconfig.json Coverage reporting in codecove & in VSTS (1st pass) (#2059) Jun 25, 2018
gulpfile.js Coverage reporting in codecove & in VSTS (1st pass) (#2059) Jun 25, 2018
icon.png moved icon Jul 2, 2017
package-lock.json Final release prep (#2190) Jul 18, 2018
package.json Final release prep (#2190) Jul 18, 2018
package.nls.es.json Added Spanish translation (#1902) Jun 8, 2018
package.nls.fr.json Update French translation. (#1973) Jun 15, 2018
package.nls.it.json Added command translations for italian (#1152) Mar 27, 2018
package.nls.ja.json 🔥 remove jupyter commands (#1034) Mar 12, 2018
package.nls.json Fix captialization Jun 21, 2018
package.nls.ko-kr.json 🔥 remove jupyter commands (#1034) Mar 12, 2018
package.nls.pt-br.json Add PT-BR translation (#1900) Jun 11, 2018
package.nls.ru.json 🔥 remove jupyter commands (#1034) Mar 12, 2018
package.nls.zh-cn.json Fix whitespace in zh-cn translation Jun 7, 2018
package.nls.zh-tw.json 🔥 remove jupyter commands (#1034) Mar 12, 2018
packageExtension.cmd VS Python analysis engine integration (#1231) Mar 30, 2018
requirements.txt Upgrade to latest LS protocol (#2164) Jul 16, 2018
tsconfig.json Re-factor code python execution framework (#345) Dec 5, 2017
tsfmt.json #1228 multi root master (#2) Nov 1, 2017
tslint.json Add missing operators in tokenizer, handle end-of-comment completion … Mar 20, 2018
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 (2.7, >=3.4), including features such as linting, debugging, IntelliSense, code navigation, code formatting, refactoring, unit tests, snippets, and more!

Quick start

Optional steps

  • Step 4. Install a linter to get errors and warnings -- you can further customize linting rules to fit your needs.
  • Step 5. Select your preferred Python interpreter/version/environment using the Select Interpreter command.
    • By default we use the one that's on your path.
    • If you have a workspace open you can also click in the status bar to change the interpreter.
  • Step 6. Install ctags for Workspace Symbols, from here, or using brew install ctags on macOS.

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: Create Terminal Create a VS Code terminal with the selected Python interpreter (environment) activated.
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.

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

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

  • 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 file 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

Feature details

  • IDE-like features
    • Automatic indenting
    • Code navigation ("Go to", "Find all" references)
    • Code definition (Peek and hover definition, View signatures)
    • Rename refactoring
    • Sorting import statements (use the Python: Sort Imports command)
  • Intellisense and autocomplete (including PEP 484 and PEP 526 support)
    • Ability to include custom module paths (e.g. include paths for libraries like Google App Engine, etc.; use the setting python.autoComplete.extraPaths = [])
  • Code formatting
    • Auto formatting of code upon saving changes (default to 'Off')
    • Use either yapf, autopep8, or Black for code formatting (defaults to autopep8)
  • Linting
  • Debugging
    • Watch window
    • Evaluate expressions
    • Step through code ("Step in", "Step out", "Continue")
    • Add/remove breakpoints
    • Local variables and arguments
    • Multi-threaded applications
    • Web applications (such as Flask & Django, with template debugging)
    • Expanding values (viewing children, properties, etc)
    • Conditional breakpoints
    • Remote debugging (over SSH)
    • Google App Engine
    • Debugging in the integrated or external terminal window
    • Debugging as sudo
  • Unit testing
    • Support for unittest, pytest, and nose
    • Ability to run all failed tests, individual tests
    • Debugging unit tests
  • Snippets
  • Miscellaneous
    • Running a file or selected text in python terminal
  • Refactoring
    • Rename refactorings
    • Extract variable refactorings
    • Extract method refactorings
    • Sort imports

General Features

Debugging

Unit Tests

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.