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

Method unload_ext

IPython/core/magics/extension.py:42–56  ·  view source on GitHub ↗

Unload an IPython extension by its module name. Not all extensions can be unloaded, only those which define an ``unload_ipython_extension`` function.

(self, module_str)

Source from the content-addressed store, hash-verified

40
41 @line_magic
42 def unload_ext(self, module_str):
43 """Unload an IPython extension by its module name.
44
45 Not all extensions can be unloaded, only those which define an
46 ``unload_ipython_extension`` function.
47 """
48 if not module_str:
49 raise UsageError('Missing module name.')
50
51 res = self.shell.extension_manager.unload_extension(module_str)
52
53 if res == 'no unload function':
54 print("The %s extension doesn't define how to unload it." % module_str)
55 elif res == "not loaded":
56 print("The %s extension is not loaded." % module_str)
57
58 @line_magic
59 def reload_ext(self, module_str):

Callers

nothing calls this directly

Calls 2

UsageErrorClass · 0.90
unload_extensionMethod · 0.80

Tested by

no test coverage detected