Closed Antyos closed 1 year ago
can you check that you have the setting "jupyter.interactiveWindow.textEditor.executeSelection": true
.
I believe a notification is supposed to show when first trying to use shift+enter to execute which can be used to set that.
can you check that you have the setting
"jupyter.interactiveWindow.textEditor.executeSelection": true
Nope, but I do now. That seems to fix the issue. Thanks!
Applies To
What happened?
Using the shortcut shift+enter to run the selected lines of code when an interactive window is open for a
.py
file attempts to run the code in a new python instance from the command line instead of in the interactive window.My guess is that the when clauses are not correct for the shift+enter keyboard shortcut. So even though an interactive window is open, shift+enter triggers
python.execSelectionInTerminal
instead ofjupyter.execSelectionInteractive
. This is very annoying because the new Python instance in the terminal (obviously) has no awareness of the variables in the interactive window.VS Code Version
Version: 1.77.1 (user setup) Commit: b7886d7461186a5eac768481578c1d7ca80e2d21 Date: 2023-04-04T23:21:11.906Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No
Jupyter Extension Version
v2023.3.1000892223
Jupyter logs
Coding Language and Runtime Version
Python 3.9.12 (venv)
Language Extension Version (if applicable)
v2023.6.0
Anaconda Version (if applicable)
No response
Running Jupyter locally or remotely?
Local