Show More
@@ -33,7 +33,6 b' import sys' | |||
|
33 | 33 | |
|
34 | 34 | from IPython import get_ipython |
|
35 | 35 | from IPython.utils import PyColorize, ulinecache |
|
36 | from IPython.core import ipapi | |
|
37 | 36 | from IPython.utils import coloransi, io, py3compat |
|
38 | 37 | from IPython.core.excolors import exception_colors |
|
39 | 38 | |
@@ -205,7 +204,7 b' class Pdb(OldPdb):' | |||
|
205 | 204 | # IPython changes... |
|
206 | 205 | self.is_pydb = has_pydb |
|
207 | 206 | |
|
208 |
self.shell = |
|
|
207 | self.shell = get_ipython() | |
|
209 | 208 | |
|
210 | 209 | if self.is_pydb: |
|
211 | 210 |
@@ -34,7 +34,7 b' import tempfile' | |||
|
34 | 34 | |
|
35 | 35 | from io import UnsupportedOperation |
|
36 | 36 | |
|
37 |
from IPython |
|
|
37 | from IPython import get_ipython | |
|
38 | 38 | from IPython.core.error import TryNext |
|
39 | 39 | from IPython.utils.data import chop |
|
40 | 40 | from IPython.utils import io |
@@ -158,7 +158,7 b' def page(strng, start=0, screen_lines=0, pager_cmd=None):' | |||
|
158 | 158 | start = max(0, start) |
|
159 | 159 | |
|
160 | 160 | # first, try the hook |
|
161 |
ip = |
|
|
161 | ip = get_ipython() | |
|
162 | 162 | if ip: |
|
163 | 163 | try: |
|
164 | 164 | ip.hooks.show_in_pager(strng) |
@@ -18,7 +18,7 b' test_run.py calls it.' | |||
|
18 | 18 | #----------------------------------------------------------------------------- |
|
19 | 19 | import sys |
|
20 | 20 | |
|
21 |
from IPython |
|
|
21 | from IPython import get_ipython | |
|
22 | 22 | |
|
23 | 23 | #----------------------------------------------------------------------------- |
|
24 | 24 | # Globals |
@@ -29,7 +29,7 b' from IPython.core import ipapi' | |||
|
29 | 29 | # want to prevent. |
|
30 | 30 | if __name__ == '__main__': |
|
31 | 31 | |
|
32 |
ip = |
|
|
32 | ip = get_ipython() | |
|
33 | 33 | |
|
34 | 34 | if not '_refbug_cache' in ip.user_ns: |
|
35 | 35 | ip.user_ns['_refbug_cache'] = [] |
@@ -99,7 +99,8 b' from inspect import getsourcefile, getfile, getmodule,\\' | |||
|
99 | 99 | |
|
100 | 100 | # IPython's own modules |
|
101 | 101 | # Modified pdb which doesn't damage IPython's readline handling |
|
102 |
from IPython |
|
|
102 | from IPython import get_ipython | |
|
103 | from IPython.core import debugger | |
|
103 | 104 | from IPython.core.display_trap import DisplayTrap |
|
104 | 105 | from IPython.core.excolors import exception_colors |
|
105 | 106 | from IPython.utils import PyColorize |
@@ -279,7 +280,7 b' def _format_traceback_lines(lnum, index, lines, Colors, lvals=None,scheme=None):' | |||
|
279 | 280 | |
|
280 | 281 | # This lets us get fully syntax-highlighted tracebacks. |
|
281 | 282 | if scheme is None: |
|
282 |
ipinst = |
|
|
283 | ipinst = get_ipython() | |
|
283 | 284 | if ipinst is not None: |
|
284 | 285 | scheme = ipinst.colors |
|
285 | 286 | else: |
@@ -602,7 +603,7 b' class ListTB(TBTools):' | |||
|
602 | 603 | |
|
603 | 604 | # sync with user hooks |
|
604 | 605 | if have_filedata: |
|
605 |
ipinst = |
|
|
606 | ipinst = get_ipython() | |
|
606 | 607 | if ipinst is not None: |
|
607 | 608 | ipinst.hooks.synchronize_with_editor(value.filename, value.lineno, 0) |
|
608 | 609 | |
@@ -957,7 +958,7 b' class VerboseTB(TBTools):' | |||
|
957 | 958 | filepath, lnum = records[-1][1:3] |
|
958 | 959 | #print "file:", str(file), "linenb", str(lnum) # dbg |
|
959 | 960 | filepath = os.path.abspath(filepath) |
|
960 |
ipinst = |
|
|
961 | ipinst = get_ipython() | |
|
961 | 962 | if ipinst is not None: |
|
962 | 963 | ipinst.hooks.synchronize_with_editor(filepath, lnum, 0) |
|
963 | 964 | # vds: << |
General Comments 0
You need to be logged in to leave comments.
Login now