/pythonVSCode

Cross platform editing, debugging, linting, testing (and more) Python (2.7 to 3.6) code (including Jupyter support) using Visual Studio Code

Primary LanguagePythonMIT LicenseMIT

Python

An extension with rich support for the Python language (including Python 3.6), with features including the following and more:

Quick Start

  • Install the extension
  • optionally install ctags for Workspace Symbols, from here, or using brew install ctags on OSX.
  • If Python is in the current path
    • You're ready to use it.
  • To select a different Python Interpreter/Version (or use Virtual Environment), use the command Select Workspace Interpreter)

For further information and details continue through to the documentation.

  • Contributions are always welcome. Fork it, modify it and create a pull request.
    • Details on contributing can be found here
  • Any and all feedback is appreciated and welcome.

Feature Details

  • IDE Features
  • Auto indenting
  • Code navigation (Go to, Find all references)
  • Code definition (Peek and hover definition, View Signature)
  • Rename refactoring
  • Sorting Import statements (use "Python: Sort Imports" command)
  • Ability to include custom module paths (e.g. include paths for libraries like Google App Engine, etc.)
  • Use the setting python.autoComplete.extraPaths = []
  • For instance getting autocomplete/intellisense for Google App Engine, add the following to your settings file:
"python.autoComplete.extraPaths": [
    "C:/Program Files (x86)/Google/google_appengine",
    "C:/Program Files (x86)/Google/google_appengine/lib" ]
  • This functionality has been moved into a separate extension Jupyter
  • Auto formatting of code upon saving changes (default to 'Off')
  • Use either yapf or autopep8 for code formatting (defaults to autopep8)
  • It can be turned off (default is to be turned on and use pylint)
  • Multiple linters supported (along with support for configuration files for each linter)
  • Supported linters include pylint, pep8, flake8, pydocstyle, prospector
  • Paths to each of the linters can be optionally configured
  • Custom plugins such as pylint plugin for Django can be easily used by modifying the settings as follows:
"python.linting.pylintArgs": ["--load-plugins", "pylint_django"]
  • Watch window
  • Evaluate Expressions
  • Step through code (Step in, Step out, Continue)
  • Add/remove break points
  • Local variables and arguments
  • Multiple Threads and Web Applications (such as Flask, Django, with template debugging)
  • Expanding values (viewing children, properties, etc)
  • Conditional break points
  • Remote debugging (over SSH)
  • Google App Engine
  • Debugging in the integrated or external terminal window
  • Support for unittests, nosetests and pytest
  • Test results are displayed in the "Python" output window
  • Run failed tests, individual tests
  • Debugging unittests
  • Snippets
  • Miscellaneous
  • Running a file or selected text in python terminal
  • Refactoring

Generate Features

Debugging

Unit Tests

Scientific Tools

Local Help

Version 0.6.5 (5 May 2017)

  • Better formatting of docstring #821, #919
  • Supporting more paths when searching for Python interpreters #569
  • Increase buffer output (to support detection large number of tests) #927

Thanks

Version 0.6.4 (4 May 2017)

  • Fix dates in changelog #899
  • Using charriage return or line feeds to split a document into multiple lines #917, #821
  • Doc string not being displayed #888
  • Supporting paths that begin with the ~/ #909
  • Supporting more paths when searching for Python interpreters #569
  • Supporting ~/ paths when providing the path to ctag file #910
  • Disable linting of python files opened in diff viewer #896
  • Added a new command Go to Python Object #928
  • Restored the menu item to rediscover tests #863
  • Changes to rediscover tests when test files are altered and saved #863

Source

GitHub

License

MIT