Loading, please wait...

Python In VS Code June 2019 Is Available Now

The release contains several improvements, closing approx 70 issues including a plot viewer with the Python Interactive window, parallel tests with pytest, and indentation of run selection in the terminal.

Recently, Microsoft announced the release of the June 2019. The release contains several improvements, closing approx 70 issues including a plot viewer with the Python Interactive window, parallel tests with pytest, and indentation of run selection in the terminal.

 

The new release brings a new Plot Viewer that can be used to manipulate any image plots, for example, the popular matplotlib plots.

Source: Microsoft

To try it out, you can start by double-clicking on the plots. Or, alternatively by clicking on the - expand image - button that is displayed when you hover over plot images in the Python Interactive Window.

The plot viewer enables you to pan, zoom in/out and navigate through plots in the current session. You can also export plots to PDF, SVG, or PNG formats.

The company said that it has also made enhancements to the reliability of statistics displayed for tests run, especially for running tests in parallel with pytest.

To run tests in parallel with pytest you will need to install the pytest-xdist package and add "-n" to a configuration file. Like, for 4 CPUs just create a pytest.ini file in the project folder then add the following content to it:

[pytest]
addopts=-n4
1
2

After that when you run and debug tests, they’ll be executed in parallel.

Now, with the new release, "Run Selection/Line in Python Terminal" command will send to the terminal a de-indentation of the selection, based on its first non-empty line.

Some other notable changes and enhancements include:

  • Allow password for remote authentication with jupyter. (#3624)
  • Data Viewer now properly handles large data frames and supports filtering with expressions on numeric columns (greater than, less than, equals to) (#5469)
  • Show preview of imported notebook in the Python Interactive window. (#5675)
  • Add support for sub process debugging, when debugging tests. (#4525)
  • Add ‘ctrl+enter’ as a keyboard shortcut for run current cell. (#5673)

To learn more you can visit the official announcement here. Or, visit the changelog here.

Users can download the Python extension from the Marketplace. The extension can also be installed directly from the extension gallery in Visual Studio Code

Advertising