Visual Studio Code Python Update Revolves Around Jupyter

Microsoft's monthly update of Visual Studio Code's Python tooling revolves around Jupyter, an interactive development environment catering to data science and scientific computing.

In VS Code, Jupyter technology is used to provide such an interactive environment for Python. "Jupyter (formerly IPython) is an open-source project that lets you easily combine Markdown text and executable Python source code on one canvas called a notebook," the company says. "Visual Studio Code supports working with Jupyter Notebooks natively, as well as through Python code files."

Jupyter functionality has been improved in multiple ways in the January 2020 release of the Python Extension for Visual Studio Code, which is now available from the Marketplace or via the extension gallery in the editor.

Here's a look at the two main improvements as detailed in a Jan. 7 blog post:

  • Kernel selection in Jupyter Notebooks: "In the top right of the Notebook Editor and the Interactive Window, you will now be able to see the current kernel that the notebook is using along with the kernel status (i.e. whether it is idle, busy, etc…). This release also allows you to change your kernel to other Python kernels. To change your current active kernel, click on the current kernel to bring up the VS Code kernel selector and select which kernel you want to switch to from the list."
  • Performance improvements in the Jupyter Notebook editor: "This release includes many improvements to the performance of Jupyter in VS Code in both the Notebook editor and the Interactive Window. This was accomplished through caching previous kernels and through optimizing the search for Jupyter. Some of the significant improvements due to these changes are:

    • Initial starting of the Jupyter server is faster, and subsequent starts of the Jupyter server are more than 2X faster
    • Creating a blank new Jupyter notebook is 2X faster
    • Opening Jupyter Notebooks (especially with a large file size) is now 2x faster

Microsoft says your improvement mileage may vary from theirs.

The release also tweaks functionality for auto-activating environments in the terminal upon loading. Developers can now choose to have environments be auto-activated in an already open terminal when the extension is loaded.

The release also fixes various issues, including an upvoted bug report dealing with the rebuilding of ctags on save and on start. The ctags tool generates workspace symbols -- such as functions -- for users, populating the document outline with file symbols to help coders more easily find them in the workspace. For Python, ctags helps coders jump to defined functions and other symbols in C/C++ extension modules. Developers can now have tags rebuilt when the Python extension loads or rebuilt for every file save.

Microsoft's VS Code dev team long ago went all in on Python, making it a focal point for language support. In 2017, Microsoft hired the creator of the extension, Don Jayamanne, and subsequently put out ads for more Python help. At that time, the Python extension had been downloaded about 4.2 million times. At the time of this writing, it has been downloaded more than 15 million times, earning an average 4.4 rating (out of 5) from 292 developers who reviewed and rated it.

The full list of changes in the new update are available in the changelog.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube