JupyterLab

JupyterLab is sagemath's newest graphical user interface.

You can determine, where jupyterlab loads startup files and notebooks from, using:

In [1]:
import os
os.getenv('DOT_SAGE')
Out[1]:
'/home/sage/.sage/'

In general, there are two types cells: input cells and output cells. The former is annotated with ‘In’ and the latter is annotated with ‘Out’ on the left side. Input cells take user input, which can be of various formats. A dropdown menu at the top allows to choose between ‘Code’, ‘Markdown’ and ‘Raw’ format. See Jake’s blog (last visit on 2019/04/18) for more shortcuts.

If you click on ‘In’ or ‘Out’ and press ‘a’, you can append a new input cell above the selected one. Or you press ‘d’ to delete the current one.

If you type ‘gc’ into an input cell and press HORIZONTAL TAB, the text will be expanded to ‘gcd’. In short: tab completion for variables/functions/classes is available.

If you create a python file foobar.py in the same directory as your notebooks, you can import this module using import foobar.