MCPcopy Index your code
hub / github.com/ipython/ipython / load_ext

Method load_ext

IPython/core/magics/extension.py:29–39  ·  view source on GitHub ↗

Load an IPython extension by its module name.

(self, module_str)

Source from the content-addressed store, hash-verified

27
28 @line_magic
29 def load_ext(self, module_str):
30 """Load an IPython extension by its module name."""
31 if not module_str:
32 raise UsageError('Missing module name.')
33 res = self.shell.extension_manager.load_extension(module_str)
34
35 if res == 'already loaded':
36 print("The %s extension is already loaded. To reload it, use:" % module_str)
37 print(" %reload_ext", module_str)
38 elif res == 'no load function':
39 print("The %s module is not an IPython extension." % module_str)
40
41 @line_magic
42 def unload_ext(self, module_str):

Callers

nothing calls this directly

Calls 2

UsageErrorClass · 0.90
load_extensionMethod · 0.80

Tested by

no test coverage detected