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)
| 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): |
nothing calls this directly
no test coverage detected