Show More
@@ -1,18 +1,20 b'' | |||
|
1 | 1 | """ |
|
2 | 2 | Shim to maintain backwards compatibility with old IPython.qt imports. |
|
3 | 3 | """ |
|
4 | 4 | # Copyright (c) IPython Development Team. |
|
5 | 5 | # Distributed under the terms of the Modified BSD License. |
|
6 | 6 | |
|
7 | 7 | import sys |
|
8 | 8 | from warnings import warn |
|
9 | 9 | |
|
10 | 10 | warn("The `IPython.qt` package has been deprecated. " |
|
11 | 11 | "You should import from qtconsole instead.") |
|
12 | 12 | |
|
13 | 13 | from IPython.utils.shimmodule import ShimModule |
|
14 | 14 | |
|
15 | 15 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
16 | 16 | # trigger the custom attribute access above |
|
17 | 17 | |
|
18 | sys.modules['IPython.qt'] = ShimModule(src='IPython.qt', mirror='qtconsole') | |
|
18 | sys.modules['IPython.qt'] = _qt = ShimModule(src='IPython.qt', mirror='qtconsole') | |
|
19 | sys.modules['IPython.qt.console'] = _console = ShimModule(src='IPython.qt.console', mirror='qtconsole') | |
|
20 | _qt.console = _console |
General Comments 0
You need to be logged in to leave comments.
Login now