Jupyter/IPython Notebooks: Shortcut for “run all”?

后端 未结 6 1059
一整个雨季
一整个雨季 2020-12-22 20:23

Is there a shortcut to run all cells in an IPython notebook?

And if not, does this have a specific reason?

6条回答
  •  礼貌的吻别
    2020-12-22 21:02

    I've been trying to do this in Jupyter Lab so thought it might be useful to post the answer here. You can find the shortcuts in settings and also add your own, where a full list of the possible shortcuts can be found here.

    For example, I added my own shortcut to run all cells. In Jupyter Lab, under Settings > Advanced Settings, select Keyboard Shortcuts, then add the following code to 'User Overrides':

    {
        "notebook:run-all-cells": {
          "command": "notebook:run-all-cells",
          "keys": [
            "Shift Backspace"
          ],
          "selector": ".jp-Notebook.jp-mod-editMode"
        }
    }
    

    Here, Shift + Backspace will run all cells in the notebook.

提交回复
热议问题