{ } Raw JSON

bundles / IPython 9.13.0 / IPython / core / extensions / ExtensionManager

MetaHasTraits

IPython.core.extensions:ExtensionManager

source: /IPython/core/extensions.py :24

Signature

def   ExtensionManager ( shell = None ** kwargs )

Members

Summary

A class to manage IPython extensions.

Extended Summary

An IPython extension is an importable Python module that has a function with the signature

def load_ipython_extension(ipython):
    # Do things with ipython

This function is called after your extension is imported and the currently active InteractiveShell instance is passed as the only argument. You can do anything you want with IPython at that point, including defining new magic and aliases, adding new components, etc.

You can also optionally define an unload_ipython_extension(ipython) function, which will be called if the user unloads or reloads the extension. The extension manager will only call load_ipython_extension again if the extension is reloaded.

You can put your extension modules anywhere you want, as long as they can be imported by Python's standard import mechanism.

Aliases

  • IPython.core.extensions.ExtensionManager