Skip to content

Repl

A jupyterlite repl can be included in a markdown file using the following syntax:

```{.repl kernel="xpython" env="my_env"}
print('hello world')
```

Options

The repl directive supports the following options:

Option Description Default
env The environment to use for the repl. -
kernel The kernel to use for the repl. -
width The width of the repl. 100%
height The height of the repl. 500px
theme The theme to use for the repl. JupyterLab Light
toolbar Whether to show the toolbar. 1

Note

At the moment, it is recommended to install the theme package in the host environment and not in then emscripten-wasm32 environment.

Example

Repl Example:
```{.repl kernel="xpython" env="my_env" theme="JLDracula"} 
print('hello world')
```

This will render the following: