Show More
@@ -49,13 +49,13 b' class ExtensionManager(Configurable):' | |||||
49 | is added to ``sys.path`` automatically. |
|
49 | is added to ``sys.path`` automatically. | |
50 | """ |
|
50 | """ | |
51 |
|
51 | |||
52 |
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC' |
|
52 | shell = Instance('IPython.core.interactiveshell.InteractiveShellABC').tag( | |
53 | allow_none=True) |
|
53 | allow_none=True) | |
54 |
|
54 | |||
55 | def __init__(self, shell=None, **kwargs): |
|
55 | def __init__(self, shell=None, **kwargs): | |
56 | super(ExtensionManager, self).__init__(shell=shell, **kwargs) |
|
56 | super(ExtensionManager, self).__init__(shell=shell, **kwargs) | |
57 |
self.shell.o |
|
57 | self.shell.observe( | |
58 | self._on_ipython_dir_changed, 'ipython_dir' |
|
58 | self._on_ipython_dir_changed, names=('ipython_dir',) | |
59 | ) |
|
59 | ) | |
60 | self.loaded = set() |
|
60 | self.loaded = set() | |
61 |
|
61 | |||
@@ -63,7 +63,7 b' class ExtensionManager(Configurable):' | |||||
63 | def ipython_extension_dir(self): |
|
63 | def ipython_extension_dir(self): | |
64 | return os.path.join(self.shell.ipython_dir, u'extensions') |
|
64 | return os.path.join(self.shell.ipython_dir, u'extensions') | |
65 |
|
65 | |||
66 | def _on_ipython_dir_changed(self): |
|
66 | def _on_ipython_dir_changed(self, change): | |
67 | ensure_dir_exists(self.ipython_extension_dir) |
|
67 | ensure_dir_exists(self.ipython_extension_dir) | |
68 |
|
68 | |||
69 | def load_extension(self, module_str): |
|
69 | def load_extension(self, module_str): |
General Comments 0
You need to be logged in to leave comments.
Login now