Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
sage -n retrolab: New
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Mar 5, 2022
1 parent 5426888 commit efc92cd
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions src/bin/sage-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,32 @@ class NotebookNbclassic(object):
print("which includes support for interacts and the ability to download and")
print("install other Jupyterlab extensions. For a minimal installation, run")
print(" sage -i jupyterlab")
print("Alternatively, you can follow the instructions at")
print(" " + _system_jupyter_url)
print("to use Sage with an existing Jupyterlab installation.")
raise SystemExit(1)
self.print_banner()
main(argv)


class NotebookRetrolab(object):
def print_banner(self):
banner()
print('Please wait while the Jupyterlab server starts...')

@classmethod
def print_help(cls):
cls(['help'])

def __init__(self, argv):
try:
from retrolab.app import main
except ImportError:
import traceback
traceback.print_exc()
print("Retrolab is not installed (at least not in this Sage installation).")
print("You can install it by running")
print(" sage -i jupyterlab_widgets retrolab")
print("which includes support for interacts and the ability to download and")
print("install other Jupyterlab extensions. For a minimal installation, run")
print(" sage -i retrolab")
raise SystemExit(1)
self.print_banner()
main(argv)
Expand Down Expand Up @@ -168,9 +191,11 @@ notebook_launcher = {
'jupyter': NotebookJupyter,
'jupyterlab': NotebookJupyterlab,
'nbclassic': NotebookNbclassic,
'retrolab': NotebookRetrolab,
'export': SageNBExport,
}


notebook_names = ', '.join(notebook_launcher.keys())


Expand Down

0 comments on commit efc92cd

Please sign in to comment.