Show More
@@ -41,6 +41,7 b' sys.path.append(os.path.join(os.path.dirname(__file__), "extensions"))' | |||
|
41 | 41 | #----------------------------------------------------------------------------- |
|
42 | 42 | |
|
43 | 43 | from .config.loader import Config |
|
44 | from .core.ipapi import get_ipython | |
|
44 | 45 | from .core import release |
|
45 | 46 | from .core.application import Application |
|
46 | 47 | from .frontend.terminal.embed import embed |
@@ -1,13 +1,9 b'' | |||
|
1 | 1 | # encoding: utf-8 |
|
2 | """ | |
|
3 | This module is *completely* deprecated and should no longer be used for | |
|
4 | any purpose. Currently, we have a few parts of the core that have | |
|
5 | not been componentized and thus, still rely on this module. When everything | |
|
6 | has been made into a component, this module will be sent to deathrow. | |
|
2 | """Simple function to call to get the current InteractiveShell instance | |
|
7 | 3 | """ |
|
8 | 4 | |
|
9 | 5 | #----------------------------------------------------------------------------- |
|
10 |
# Copyright (C) 20 |
|
|
6 | # Copyright (C) 2013 The IPython Development Team | |
|
11 | 7 | # |
|
12 | 8 | # Distributed under the terms of the BSD License. The full license is in |
|
13 | 9 | # the file COPYING, distributed as part of this software. |
@@ -17,13 +13,25 b' has been made into a component, this module will be sent to deathrow.' | |||
|
17 | 13 | # Imports |
|
18 | 14 | #----------------------------------------------------------------------------- |
|
19 | 15 | |
|
16 | import warnings | |
|
17 | ||
|
20 | 18 | #----------------------------------------------------------------------------- |
|
21 | 19 | # Classes and functions |
|
22 | 20 | #----------------------------------------------------------------------------- |
|
23 | 21 | |
|
24 | 22 | |
|
25 | def get(): | |
|
26 |
"""Get the global InteractiveShell instance. |
|
|
23 | def get_ipython(): | |
|
24 | """Get the global InteractiveShell instance. | |
|
25 | ||
|
26 | Returns None if no InteractiveShell instance is registered. | |
|
27 | """ | |
|
27 | 28 | from IPython.core.interactiveshell import InteractiveShell |
|
28 |
|
|
|
29 | if InteractiveShell.initialized(): | |
|
30 | return InteractiveShell.instance() | |
|
31 | ||
|
32 | def get(): | |
|
33 | warnings.warn("ipapi.get has been deprecated since IPython 0.11", | |
|
34 | DeprecationWarning | |
|
35 | ) | |
|
36 | return get_ipython() | |
|
29 | 37 |
General Comments 0
You need to be logged in to leave comments.
Login now