##// END OF EJS Templates
remove deprecated `get`
MinRK -
Show More
@@ -1,37 +1,30 b''
1 # encoding: utf-8
1 # encoding: utf-8
2 """Simple function to call to get the current InteractiveShell instance
2 """Simple function to call to get the current InteractiveShell instance
3 """
3 """
4
4
5 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
6 # Copyright (C) 2013 The IPython Development Team
6 # Copyright (C) 2013 The IPython Development Team
7 #
7 #
8 # Distributed under the terms of the BSD License. The full license is in
8 # Distributed under the terms of the BSD License. The full license is in
9 # the file COPYING, distributed as part of this software.
9 # the file COPYING, distributed as part of this software.
10 #-----------------------------------------------------------------------------
10 #-----------------------------------------------------------------------------
11
11
12 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
13 # Imports
13 # Imports
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15
15
16 import warnings
16 import warnings
17
17
18 #-----------------------------------------------------------------------------
18 #-----------------------------------------------------------------------------
19 # Classes and functions
19 # Classes and functions
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21
21
22
22
23 def get_ipython():
23 def get_ipython():
24 """Get the global InteractiveShell instance.
24 """Get the global InteractiveShell instance.
25
25
26 Returns None if no InteractiveShell instance is registered.
26 Returns None if no InteractiveShell instance is registered.
27 """
27 """
28 from IPython.core.interactiveshell import InteractiveShell
28 from IPython.core.interactiveshell import InteractiveShell
29 if InteractiveShell.initialized():
29 if InteractiveShell.initialized():
30 return InteractiveShell.instance()
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()
37
General Comments 0
You need to be logged in to leave comments. Login now