Reputation: 7772
looking to move away from Jupyter Notebook and seen interactive window in VSCode. However selecting code and then pressing shift+enter sends execution output to terminal, not interactive window.
Added code to keyboard shortcuts:
{
"key": "shift+enter",
"command": "python.execSelectionInteractive",
"when": "editorTextFocus && editorLangId == 'python'"
}
But that didn't work. Output still in terminal. What do I need to do?
Upvotes: 0
Views: 30
Reputation: 7772
Ah. https://www.youtube.com/watch?v=F60iJ3xxgtg
Add
# %%
And there you go. Interactive code like Jupyter Notebook in script. Nice.
Upvotes: 0