You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
root ee22027d4f
fix rights to 755 (linux actual)
2 years ago
..
README.md fix rights to 755 (linux actual) 2 years ago
cell_toolbar_menu.png fix rights to 755 (linux actual) 2 years ago
icon.png fix rights to 755 (linux actual) 2 years ago
init_cell.yaml fix rights to 755 (linux actual) 2 years ago
main.js fix rights to 755 (linux actual) 2 years ago

README.md

init_cell

Add a cell toolbar selector to mark cells as 'initialization' cells . Such initialization cells are run:

  • on clicking the provided button in the main toolbar main toolabr button
  • by default, on kernel ready notification for trusted notebooks. This is configurable (see options section). In untrusted notebooks, a warning is displayed if the cells would otherwise have been run.

Options

This nbextension provides option configurable using the jupyter_nbextensions_configurator.

Once the extension is enabled, turn on the cell toolbar within your Notebook using the "View > Cell Toolbar > Initialization Cell" menu Cell Toobar Menu

The running of initialization cells on kernel ready notification can be frustrating if your kernel is attached to multiple frontends, or is persistent between frontend reloads (e.g. reloading the notebook browser page without killing the kernel). As such, the option init_cell.run_on_kernel_ready in the notebook config section controls whether this behaviour occurs. The server's config value can also be overridden on a per-notebook basis by setting notebook.metadata.init_cell.run_on_kernel_ready.

Internals

Cells are marked as initialization cells in their metadata, as

cell.metadata.init_cell = true

The running of initialization cells on kernel ready is bound to the Jupyter event kernel_ready.Kernel.