##// END OF EJS Templates
Don't rely on `get_ipython` in builtins in library code
MinRK -
Show More
@@ -33,7 +33,7 b' from IPython.core.error import TryNext'
33 33 from IPython.utils._process_common import arg_split
34 34
35 35 # FIXME: this should be pulled in with the right call via the component system
36 from IPython.core.ipapi import get as get_ipython
36 from IPython import get_ipython
37 37
38 38 #-----------------------------------------------------------------------------
39 39 # Globals and constants
@@ -31,6 +31,7 b' import functools'
31 31 import linecache
32 32 import sys
33 33
34 from IPython import get_ipython
34 35 from IPython.utils import PyColorize, ulinecache
35 36 from IPython.core import ipapi
36 37 from IPython.utils import coloransi, io, py3compat
@@ -113,9 +114,8 b' class Tracer(object):'
113 114 from the Python standard library for usage details.
114 115 """
115 116
116 try:
117 ip = get_ipython()
118 except NameError:
117 ip = get_ipython()
118 if ip is None:
119 119 # Outside of ipython, we set our own exception hook manually
120 120 sys.excepthook = functools.partial(BdbQuit_excepthook,
121 121 excepthook=sys.excepthook)
@@ -33,6 +33,7 b' use of the system.'
33 33 import sys
34 34 import threading
35 35
36 from IPython import get_ipython
36 37 from IPython.core.ultratb import AutoFormattedTB
37 38 from IPython.utils.warn import error
38 39
@@ -8,6 +8,8 b' Contributions are *very* welcome.'
8 8 import os
9 9 import pipes
10 10 import subprocess
11
12 from IPython import get_ipython
11 13 from IPython.core.error import TryNext
12 14
13 15
General Comments 0
You need to be logged in to leave comments. Login now