Code

Write python and see outputs

Outputs in Dolphyn work exactly the same as they do in jupyter notebooks. In order for you to see an output, the code written must evaluate a variable or explicitly print something out.
The default block on Dolphyn pages is a code block, where you can edit and execute valid Python. You can run these blocks to show outputs of the code written in them.
Add and execute python to a page using a code block

Adding a code block

There are several ways to add a code block into a page:
  • Hover over a block and click on the + button to the left
  • Open the / menu and search for 'code' or type /code
  • Click in the empty space below the last block on your page

Executing a code block

There are two ways to execute (run) a code block:
  1. 1.
    By pressing Shift + Enter when your cursor is in a code block
  2. 2.
    Pressing the Run button found at the top right of a code block

Minimizing outputs

At times, you may run a python code block that generates a large output, in which case you may want to minimize it. You can do so by clicking on the ... menu on the output and selecting Minimize.
Minimizing temporarily hides the output, you can click the Expand button to see the full output again.
In the next section, we'll see how you can sync and save code blocks for use across various pages, and also so that your teammates can use them as well.