Show More
@@ -39,6 +39,7 | |||||
39 | }, |
|
39 | }, | |
40 | "outputs": [], |
|
40 | "outputs": [], | |
41 | "source": [ |
|
41 | "source": [ | |
|
42 | "from IPython import get_ipython\n", | |||
42 | "from IPython.nbformat import current\n", |
|
43 | "from IPython.nbformat import current\n", | |
43 | "from IPython.core.interactiveshell import InteractiveShell" |
|
44 | "from IPython.core.interactiveshell import InteractiveShell" | |
44 | ] |
|
45 | ] | |
@@ -138,6 +139,7 | |||||
138 | " mod = types.ModuleType(fullname)\n", |
|
139 | " mod = types.ModuleType(fullname)\n", | |
139 | " mod.__file__ = path\n", |
|
140 | " mod.__file__ = path\n", | |
140 | " mod.__loader__ = self\n", |
|
141 | " mod.__loader__ = self\n", | |
|
142 | " mod.__dict__['get_ipython'] = get_ipython\n", | |||
141 | " sys.modules[fullname] = mod\n", |
|
143 | " sys.modules[fullname] = mod\n", | |
142 | " \n", |
|
144 | " \n", | |
143 | " # extra work to ensure that magics that would affect the user_ns\n", |
|
145 | " # extra work to ensure that magics that would affect the user_ns\n", |
General Comments 0
You need to be logged in to leave comments.
Login now