Warning
This documentation is for an old version of IPython. You can find docs for newer versions here.
Module: html.nbextensions
¶
Utilities for installing Javascript extensions for the notebook
2 Classes¶
-
class
IPython.html.nbextensions.
ArgumentConflict
¶ Bases:
ValueError
-
class
IPython.html.nbextensions.
NBExtensionApp
(**kwargs)¶ Bases:
IPython.core.application.BaseIPythonApplication
Entry point for installing notebook extensions
2 Functions¶
-
IPython.html.nbextensions.
check_nbextension
(files, user=False, prefix=None, nbextensions_dir=None)¶ Check whether nbextension files have been installed
Returns True if all files are found, False if any are missing.
Parameters: files : list(paths)
a list of relative paths within nbextensions.
user : bool [default: False]
Whether to check the user’s .ipython/nbextensions directory. Otherwise check a system-wide install (e.g. /usr/local/share/jupyter/nbextensions).
prefix : str [optional]
Specify install prefix, if it should differ from default (e.g. /usr/local). Will check prefix/share/jupyter/nbextensions
nbextensions_dir : str [optional]
Specify absolute path of nbextensions directory explicitly.
-
IPython.html.nbextensions.
install_nbextension
(path, overwrite=False, symlink=False, user=False, prefix=None, nbextensions_dir=None, destination=None, verbose=1)¶ Install a Javascript extension for the notebook
Stages files and/or directories into the nbextensions directory. By default, this compares modification time, and only stages files that need updating. If
overwrite
is specified, matching files are purged before proceeding.Parameters: path : path to file, directory, zip or tarball archive, or URL to install
By default, the file will be installed with its base name, so ‘/path/to/foo’ will install to ‘nbextensions/foo’. See the destination argument below to change this. Archives (zip or tarballs) will be extracted into the nbextensions directory.
overwrite : bool [default: False]
If True, always install the files, regardless of what may already be installed.
symlink : bool [default: False]
If True, create a symlink in nbextensions, rather than copying files. Not allowed with URLs or archives. Windows support for symlinks requires Vista or above, Python 3, and a permission bit which only admin users have by default, so don’t rely on it.
user : bool [default: False]
Whether to install to the user’s .ipython/nbextensions directory. Otherwise do a system-wide install (e.g. /usr/local/share/jupyter/nbextensions).
prefix : str [optional]
Specify install prefix, if it should differ from default (e.g. /usr/local). Will install to
<prefix>/share/jupyter/nbextensions
nbextensions_dir : str [optional]
Specify absolute path of nbextensions directory explicitly.
destination : str [optional]
name the nbextension is installed to. For example, if destination is ‘foo’, then the source file will be installed to ‘nbextensions/foo’, regardless of the source name. This cannot be specified if an archive is given as the source.
verbose : int [default: 1]
Set verbosity level. The default is 1, where file actions are printed. set verbose=2 for more output, or verbose=0 for silence.