Load an IPython extension by its module name.
(self, module_str)
| 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): |
nothing calls this directly
no test coverage detected