Show More
@@ -3,6 +3,7 b'' | |||
|
3 | 3 | # Copyright (c) IPython Development Team. |
|
4 | 4 | # Distributed under the terms of the Modified BSD License. |
|
5 | 5 | |
|
6 | import sys | |
|
6 | 7 | import types |
|
7 | 8 | |
|
8 | 9 | class ShimModule(types.ModuleType): |
@@ -10,6 +11,8 b' class ShimModule(types.ModuleType):' | |||
|
10 | 11 | def __init__(self, *args, **kwargs): |
|
11 | 12 | self._mirror = kwargs.pop("mirror") |
|
12 | 13 | super(ShimModule, self).__init__(*args, **kwargs) |
|
14 | if sys.version_info >= (3,4): | |
|
15 | self.__spec__ = __import__(self._mirror).__spec__ | |
|
13 | 16 | |
|
14 | 17 | def __getattr__(self, key): |
|
15 | 18 | # Use the equivalent of import_item(name), see below |
General Comments 0
You need to be logged in to leave comments.
Login now