简体   繁体   English

JupyterLab:运行下面的所有单元格

[英]JupyterLab: Run all cells below

In the Jupyter Notebook I could use the following command to automatically execute all cells below the current cell.在 Jupyter Notebook 中,我可以使用以下命令自动执行当前单元格下的所有单元格。

from IPython.display import Javascript
display(Javascript('IPython.notebook.execute_cells_below()'))

However, this doesn't seem to work with JupyterLab.但是,这似乎不适用于 JupyterLab。 How can I make this work for JupyterLab?我怎样才能让 JupyterLab 做到这一点? (I want to automatically execute all cells below after a button click occured. The original code for this was posted here: IPython - Run all cells below from a widget ) (我想在单击按钮后自动执行下面的所有单元格。原始代码发布在这里: IPython - 从小部件运行下面的所有单元格

It is built-in. 它是内置的。 Click the run menu at the top-left and select "Run Selected Cell and All Below". 单击左上角的运行菜单,然后选择"Run Selected Cell and All Below".

在此处输入图片说明

This might be possible with ipylab.这可能通过 ipylab 实现。 However, in JupyterLab 3.2.3 ipylab does not seem to work.但是,在 JupyterLab 3.2.3 中,ipylab 似乎不起作用。

Also see How to cause Jupyter Lab to save notebook (programmatically)另请参阅如何使 Jupyter Lab 保存笔记本(以编程方式)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM