
Python in Visual Studio Code - June release
- Transfer
We are pleased to announce that the Python extension for Visual Studio Code from June 2019 is already available. You can download the Python extension from the Marketplace or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by simply restarting Visual Studio Code. To learn more about Python support in Visual Studio Code, see the documentation .
In this release, we have made improvements that are listed in our changelog , resolving a total of 70 issues, including those related to the graph viewer with the Python Interactive window and parallel tests with pytest. Read about all the changes under the cat.

Graphs are commonly used to visualize data. One of the most popular features of the Python interactive window is the ability to take a deeper look at the created graphs, for example, scaling, panning and exporting them. The June update includes a completely new viewer that can be used to work with any chart images, such as from the matplotlib library.
You can open the viewer by double-clicking on the graph or by clicking on the “maximize image” button that appears when you hover over the graphics in the Python interactive window:

Using the chart viewer, you can move charts, zoom in and out, switch between charts in the current session and export them to PDF, SVG or PNG.
We have made improvements in the reliability of statistics displayed for running tests, in particular, for running tests in parallel with pytest.
You can run tests in parallel with pytest by installing the pytest-xdist package and adding “-n <number of processors>” to the configuration file. For example, for 4 processors, you can create the pytest.ini file in the project folder and add the following contents to it:
Now, when you run and debug tests, they will run in parallel.

You can refer to our documentation to learn more about testing support in the Python extension.
In our GitHub repository , the VS Code Python function is extremely popular , which removed the general indentation of the selected code before sending it to the terminal when the Run Selection / Line in Python Terminal command was run. Starting with this release, the command will send the terminal code with deleted common indentation, based on the first non-empty line of the selected code.

We also added minor improvements and fixed the problems that users reported to us. The following are some notable changes:
Be sure to install the Python extension for Visual Studio Code right now to appreciate the above innovations. If you encounter any problems, please report it on the Python VS Code GitHub page .
In this release, we have made improvements that are listed in our changelog , resolving a total of 70 issues, including those related to the graph viewer with the Python Interactive window and parallel tests with pytest. Read about all the changes under the cat.

Plot Viewer with Python Window
Graphs are commonly used to visualize data. One of the most popular features of the Python interactive window is the ability to take a deeper look at the created graphs, for example, scaling, panning and exporting them. The June update includes a completely new viewer that can be used to work with any chart images, such as from the matplotlib library.
You can open the viewer by double-clicking on the graph or by clicking on the “maximize image” button that appears when you hover over the graphics in the Python interactive window:

Using the chart viewer, you can move charts, zoom in and out, switch between charts in the current session and export them to PDF, SVG or PNG.
Parallel tests with pytest
We have made improvements in the reliability of statistics displayed for running tests, in particular, for running tests in parallel with pytest.
You can run tests in parallel with pytest by installing the pytest-xdist package and adding “-n <number of processors>” to the configuration file. For example, for 4 processors, you can create the pytest.ini file in the project folder and add the following contents to it:
[pytest]
addopts=-n4
Now, when you run and debug tests, they will run in parallel.

You can refer to our documentation to learn more about testing support in the Python extension.
Indent on selective start in terminal
In our GitHub repository , the VS Code Python function is extremely popular , which removed the general indentation of the selected code before sending it to the terminal when the Run Selection / Line in Python Terminal command was run. Starting with this release, the command will send the terminal code with deleted common indentation, based on the first non-empty line of the selected code.

Other changes and improvements.
We also added minor improvements and fixed the problems that users reported to us. The following are some notable changes:
- Password is allowed for remote authentication using jupyter. ( # 3624 )
- Data Viewer now correctly handles large data frames and supports filtering with expressions in numeric columns (more, less, equal) ( # 5469 )
- Preview imported laptop in an interactive Python window. (# 5675 )
- Added support for debugging a subprocess when debugging tests. ( # 4525 )
- Added support for activating conda environments in powershell. ( # 668 )
- Add “Ctrl + Enter” as a keyboard shortcut to launch the current cell. ( # 5673 )
Be sure to install the Python extension for Visual Studio Code right now to appreciate the above innovations. If you encounter any problems, please report it on the Python VS Code GitHub page .