Repl

Add a <py-repl> tag anywhere on your page to create REPL.

<py-repl></py-repl>

Enter Python code within the tag to pre-populate the REPL with code when the page loads.

Add the auto-generate attribute to this tag to automatically add a new REPL cell to the page underneath the current one when the current one executes.

Add the output attribute to the this tag to specify the id of a DOM element where calls to display() send their output.

<py-repl auto-generate output="some-id" ></py-repl>