最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What is VSCode setting to send output from code executed to interactive window instead of terminal? - Stack Overflow

programmeradmin0浏览0评论

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?

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?

Share Improve this question asked Feb 8 at 9:43 elksie5000elksie5000 7,76214 gold badges64 silver badges102 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Ah. https://www.youtube.com/watch?v=F60iJ3xxgtg

Add

# %%

And there you go. Interactive code like Jupyter Notebook in script. Nice.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论