Running Python Scripts with Code Runner πŸƒΒΆ

Installing Code Runner ExtensionΒΆ

Click the extension icon on the left most stripe and type code runner in the search bar. You should see the extension popping up in the first row. Click and install.

Imgur

Setting up Code RunnerΒΆ

By default, code runner uses its own panel for showing the results after you run your python script. However, it’s better to set it up in a way that it will show the results in the integrated terminal.

  • Press ctrl+, to open up the settings panel

  • On the search bar type code runner terminal

  • You should be able to see an option named Code-runner: Run In Terminal

  • Check off the option and you are good to go 🍰

Imgur

Running Python ScriptsΒΆ

  • Create and select your python environment (See the instructions here.)

  • Create a new file via ctrl+N

  • Press ctrl+s to save the file and give it a name with .py extension

  • Write down your python code in the file

  • Press ctrl+alt+N to run the code via Code Runner

  • You should see your results in the integrated terminal πŸ›¬

  • To run only a selected lines of codes, select the lines you want to run and press ctrl+alt+N.

Imgur