-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Problem
Many Python libraries used in the classic notebook rely on IPython and Jupyter being exposed on window.
This makes porting extensions to JupyterLab / RetroLab a bit difficult since this is not supported anymore.
Proposed Solution
Maybe RetroLab (and only RetroLab) should provide a compat layer and expose window.IPython and window.Jupyter. So things like Jupyter.notebook.save() executed in a JS cell still work in RetroLab by default.
An alternative for now is to use the jupyterapp main application on window with --expose-app-in-browser:
Which can be used to execute arbitrary commands:
window-jupyterapp.mp4
This can be implemented as a new extension in the retrolab repo. The extension would expose the classic notebook API, but call JupyterLab APIs internally.
Additional context
This would help with use cases like ucbds-infra/otter-grader#448
Linking to the custom front-end extension documentation for reference: https://jupyter-notebook.readthedocs.io/en/stable/extending/frontend_extensions.html