
I’ve been using Jupyter <https://jupyter.org/> as a convenient basis for “scratchpad” programming (not just in Python, but also some other languages) for a while now. I had heard about this next-generation “JupyterLab” thing they were working on, but always held off trying it out. Then I did my usual monthly upgrade of Debian Unstable on my main machine a few days ago, and this time my Jupyter installation broke. So I updated my wrapper scripts for building Jupyter from source, to check out more recent versions of all the necessary components. Got the build done, started it up, and ... it seems my Jupyter has turned into JupyterLab. Yup, it has a new interface now. The file-manager display no longer seems to open things with a single click; that now only selects items, and you then have to perform an action (like open a notebook) from a right-click menu. And there is no “open in new tab/window” menu item; creating a new tab always happens when opening a notebook, while opening a subfolder always replaces the current tab contents. I used to be able to middle-click on a folder to open it in a new tab, but that option is now gone. There is an option in the right-click menu to “Copy Shareable Link”. When you do this on a notebook or folder and paste the result into the address bar, it opens the item in what I can only call “lab” mode. The window now has three panes, with the middle one an editor-type display, for viewing/editing notebook contents and other document content. The left-hand pane can show various things, selected by clicking one of the icons in its leftmost margin: it can show folder contents, or the table of contents of the current notebook, or a summary of open notebooks, running processes etc. And in the right-hand pane, there are various kinds of “tools” (for debugging, inspection etc) that only seem to appear when viewing notebook content. Ah, discovered how to control the visibility of this “tool” pane: it has two icons for selecting the two different categories of this it can display. But if you click the icon for the section that is already showing, the whole pane shrinks down to a narrow strip just showing the icons. Click again to expand the pane, of course. Further ah, same thing happens with the left-hand pane: click the icon for the section that’s already showing, and that pane too shrinks down. Hiding both the left- and right-hand panes brings you almost back to the old-style minimal-frills notebook/document display, except it only takes a click to bring one of those extras back. The middle pane has its own tab system, to let you have multiple documents open at once. You can drag its internal tabs around to tile them vertically or horizontally. And you can just drag a document to here from the folder display on the left to open it. Click on the document tab header, and that item opens in a separate browser window/tab. If nothing is open here it defaults to showing a “Launcher” tab, with icons for creating notebooks, opening terminal sessions, and creating other document types. The “lab” mode is activated by having an extra “/lab” part in the URL; if you remove this, it reverts to the old-style view of a single folder or notebook. Another thing that has changed is the way notebooks are saved. Previously, there was a menu option to “save and checkpoint” (with no option to do a manual save without checkpointing). And I found that if you tried to close the view of a modified notebook, it would ask to confirm you wanted to close the tab/window, but regardless of which you selected, the notebook would still be saved back to the file. Now that confirm-close trick no longer does saving; you have to explicitly select Save from the File menu, or hit CTRL/S. Checkpointing might still happen automatically as part of autosaving; I can’t find a menu option for explicitly creating a checkpoint, only for restoring from one. So anyway, a lot of intriguing new stuff in there to discover. If you like experimenting with code (as I do), Jupyter can be a great way to do it.
participants (1)
-
Lawrence D'Oliveiro