VS Code for python

A quite good python IDE



VS Code support for python is getting pretty good.

I need to note how.

“Intellisense”

pylance (source) is an extension that works alongside Python in Visual Studio Code to provide performant language support. Under the hood, Pylance is powered by Pyright, Microsoft’s static type checking tool. Using Pyright, Pylance has the ability to supercharge your Python IntelliSense experience with rich type information, helping you write better code faster.

There are other language servers but I have found it advisable to force pylance otherwise things crash.

Interaction

jupyter

Jupyter notebook support is highly evolved. I am a jupyter skeptic but I have to admit this does pick some of the some of the rougher chunks in the the jupyter grind.

All in all, t is much better than the jupyter notebook browser front end or the new jupyter lab. I imagine that some jupyter extensions don’t work, but since all the extensions I was installing were simply to try and make jupyter behave a little bit more like vs code, they are, AFAICT, redundant.

Further, heaps of other things that jupyter cannot even dream of just magically work! Session sharing? No problem. Remote editing? Easy! Type inference! Autocomplete! Debugger injection! Search and replace across a whole project! Style checking! refactor assistance! Comprehensible documentation.

naked python

One thing I discovered by accident today is that the jupyter support includes a fully interactive python code environment that does not at all require the awful jupyter notebook.

The magic trick is to put the following comment in:

# %%

Now everything after it is one “cell” that I can run with a click.

Refactoring

TBD


No comments yet. Why not leave one?

GitHub-flavored Markdown & a sane subset of HTML is supported.