Skip to content
Juergen Hasch edited this page Aug 24, 2015 · 26 revisions

There is now a graphical user interface for activating/deactivating installed notebook extensions by going to the '/nbextensions/' URL (mind the trailing slash):

This is realized using a notebook server extension, new to IPython 3.x. In order to work, this extension needs to be installed and notebook extensions require a YAML description file in '~/.ipython/nbextensions' (or a subdirectory thereof) in order to be found.

#Setup procedure ##1. Installation All required files are originally located in the 'config' subdirectory of the repository.

  • copy 'main.js' and 'main.css' to your '~/.ipython/nbextensions/config' folder
  • copy 'nbextensions.py' to your '~/.ipython/extensions' folder
  • copy 'nbextensions.html' to your '~/.ipython/templates' folder

##2. Configuration Add the following lines to your 'ipython_notebook_config.py' file (inside your profile directory, e.g. ~/.ipython/profile_default/):

from IPython.utils.path import get_ipython_dir
import os
import sys

ipythondir = get_ipython_dir()
extensions = os.path.join(ipythondir,'extensions') 
sys.path.append( extensions )

c = get_config()
c.NotebookApp.server_extensions = [ 'nbextensions']
c.NotebookApp.extra_template_paths = [os.path.join(ipythondir,'templates') ]

#YAML file format The YAML file can have any name with the extension YAML, and describes the notebook extension.

  • Type - identifier 'IPython Notebook Extension'
  • Name - unique name of the extension
  • Description - short explanation of the extension
  • Link - link to more documentation
  • Icon - small icon 400px wide
  • Main - main file that is loaded, typically 'main.js'
  • Compatibility- IPython version compatibility (3.x or 4.x)
  • Parameter - Optional configuration parameter
  • ParameterDescription - Description of the configuration parameter

Example:

Type: IPython Notebook Extension
Name: Shift-Tab
Description: Assign shift+tab key for dedent operation
Link: https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/Shift-tab
Icon: icon.png
Main: main.js
Compatibility: 3.x 

Clone this wiki locally