简体   繁体   English

如何在 Visual Studio 代码交互式 window 中编辑单元格

[英]How do I edit a cell in visual studio code interactive window

In vscode you can use "Jupyter: Create interactive window" to create an interactive window that resembles jupyter notebook.在 vscode 中你可以使用“Jupyter:创建交互式窗口”来创建一个类似于 jupyter notebook 的交互式 window。 However, in the interactive window I am unable to do a couple of things that I enjoy from jupyter notebook, such as editing a cell or moving the cells around.但是,在交互式 window 中,我无法做一些我喜欢 jupyter notebook 的事情,例如编辑单元格或移动单元格。 Is there any way to do these things inside an interactive window, without having to create an.ipynb file?有没有办法在交互式 window 中做这些事情,而不必创建一个 .ipynb 文件?

Not a direct answer but: for editing you can use # %% to create 'cells' directly in the script you are working on.不是直接的答案,而是:对于编辑,您可以使用# %%直接在您正在处理的脚本中创建“单元格”。 Then you can run the cells in the interactive window, this allows you to edit and re run.然后您可以运行交互式 window 中的单元格,这允许您编辑并重新运行。 Explained in detail in the Jupyter code cells section from the Python Interactive Window Tutorial .Python 交互式 Window 教程的 Jupyter 代码单元部分中进行了详细说明。

example from the Tutorial教程中的示例

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在执行代码时打开或关闭Visual Studio python(Jupyter)交互式窗口(2019)? - How do i turn on or off the Visual Studio python (Jupyter) interactive window (2019) when executing code? 如何在 Visual Studio Code 中查找/执行 Python 交互模式? - How do I find/excute Python Interactive Mode in Visual Studio Code? 如何在 Visual Studio Code 1.44.2 中打开交互式 shell/REPL? - How do I open the interactive shell/REPL in Visual Studio Code 1.44.2? Visual Studio Code - 专注于代码执行时的交互 Window - Visual Studio Code - Focus on Interactive Window Upon Code Execution Visual Studio Code Python Interactive Window env 与所选不同? - Visual Studio Code Python Interactive Window env different from selected? 在Visual Studio(PTVS)的Python工具中调试python代码时,如何禁止控制台窗口? - How do I suppress the console window when debugging python code in Python Tools for Visual Studio (PTVS)? Visual Studio“立即窗口”与“交互窗口” - Visual Studio “Immediate Window” vs “Interactive Window” 如何将类导入到 pycharm 或 Visual Studio 的交互式窗口中 - How to you import a class into the interactive window for pycharm or Visual Studio 如何使用 python 命令关闭 Visual Studio 代码 window? - How can i close the visual studio code window with a python command? 如何让我的交互式 Holoviews 图形显示在 Visual Studio 中(没有 Jupyter)? - How do i get my interactive Holoviews graph to display in Visual Studio (without Jupyter)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM