The Sage ZMQ Kernel#
Version of the Jupyter kernel when running Sage inside the Jupyter notebook or remote Jupyter sessions.
- class sage.repl.ipython_kernel.kernel.SageKernel(**kwargs: Any)#
Bases:
IPythonKernel
The Sage Jupyter Kernel
INPUT:
See the Jupyter documentation
EXAMPLES:
sage: from sage.repl.ipython_kernel.kernel import SageKernel sage: SageKernel.__new__(SageKernel) <sage.repl.ipython_kernel.kernel.SageKernel object at 0x...>
- property banner#
The Sage Banner
The value of this property is displayed in the Jupyter notebook.
OUTPUT:
String.
EXAMPLES:
sage: from sage.repl.ipython_kernel.kernel import SageKernel sage: sk = SageKernel.__new__(SageKernel) sage: print(sk.banner) ┌...SageMath version...
- property help_links#
Help in the Jupyter Notebook
OUTPUT:
See the Jupyter documentation.
Note
Urls starting with “kernelspecs” are prepended by the browser with the appropriate path.
EXAMPLES:
sage: from sage.repl.ipython_kernel.kernel import SageKernel sage: sk = SageKernel.__new__(SageKernel) sage: sk.help_links [{'text': 'Sage Documentation', 'url': 'kernelspecs/sagemath/doc/html/en/index.html'}, ...]
- implementation = 'sage'#
- implementation_version = '10.1'#
- pre_handler_hook()#
Restore the signal handlers to their default values at Sage startup, saving the old handler at the
saved_sigint_handler
attribute. This is needed because Jupyter needs to change theSIGINT
handler.See github issue #19135.
- shell_class#
A trait whose value must be a subclass of a specified class.
- class sage.repl.ipython_kernel.kernel.SageZMQInteractiveShell(**kwargs: Any)#
Bases:
SageNotebookInteractiveShell
,ZMQInteractiveShell