The list of commands available in the notebook is made up of standard commands with some restrictions and additions. View the list of standard commands in the IPython documentation. Restrictions and additions are given below.
Disabled standard commands
Standard commands that aren't available in the notebook:
Alternative use of blocked commands
To run bash commands, put 'bash' explicitly at the beginning of the cell:
With no configuration specified. The default configuration is used in this case.
With a configuration specified:
For example, to run commands in the configuration c1.4 , enter
The available configurations are described in Computing resource configurations
The following restrictions apply to using bash commands:
- Background jobs are not supported, for example,
pipis not supported. Use the
%pipformat for pip.
Additional commands available in the notebook.
Managing state saving
Commands to exclude and add variables when saving a state:
%state_exclude [variable names]: Excludes the specified variables when saving a state.
%state_include [variable names]: Adds the specified variables when saving a state.
%state_include_all: Returns all variables when saving a state.
%state_exclude_ls: Returns a list of all variables that were excluded when saving a state.
Adding read-only variables
The state of cells is saved after they're run and the variable values are overwritten. Saving large variables may take some time. If a variable is intended to store a constant value, it can be declared as a read-only variable. Such variables aren't overwritten when saving and serializing data, which speeds up these operations.
To specify that a cell's variable is read-only, use the command:
#pragma readonly/ro <variable 1>, <variable 2>
This command should be placed in the first lines of the cell before the code but allowed after the configuration update (
Possible options for writing the command using
y variables as an example:
#pragma readonly x, y
#pragma readonly x y
#pragma readonly x
#pragma readonly y
#pragma ro x, y