Visual Studio Code Run Python Script Shortcut
Select interpreter in the command palette.
Visual studio code run python script shortcut. It s a feature called tasks and while the examples give are for compiling code you can pretty much just run any program against the code you are editing in vscode. This guide assumes you have a python runtime on your machine whether 2 7 or 3 5 and vs code version 1 9 or above. How to run python code interactively a widely used way to run python code is through an interactive session. In the text editor.
Right click anywhere in the editor and select run python file in terminal. Unlike microsoft visual studio where you can simply press the f5 key to build and execute your program microsoft visual studio code in reference to python you only get an option for debug. To start a python interactive session just open a command line or terminal and then type in python or python3 depending on your python installation and then hit enter. If invoked on a selection only that selection is run.
There isn t much support for python in microsoft new code editor visual studio code vscode but there is a neat way to run your python code right inside vscode. So to answer your question.