Show More
@@ -90,7 +90,7 b' from inspect import getsourcefile, getfile, getmodule,\\' | |||
|
90 | 90 | |
|
91 | 91 | # IPython's own modules |
|
92 | 92 | # Modified pdb which doesn't damage IPython's readline handling |
|
93 | from IPython import Debugger, PyColorize | |
|
93 | from IPython import Debugger, PyColorize, ipapi | |
|
94 | 94 | from IPython.ipstruct import Struct |
|
95 | 95 | from IPython.excolors import exception_colors |
|
96 | 96 | from IPython.genutils import Term,uniq_stable,error,info |
@@ -268,9 +268,7 b' def _formatTracebackLines(lnum, index, lines, Colors, lvals=None,scheme=None):' | |||
|
268 | 268 | # This lets us get fully syntax-highlighted tracebacks. |
|
269 | 269 | if scheme is None: |
|
270 | 270 | try: |
|
271 | # Again, reference to a global __IPYTHON__ that doesn't exist. | |
|
272 | # XXX | |
|
273 | scheme = __IPYTHON__.rc.colors | |
|
271 | scheme = ipapi.get().IP.rc.colors | |
|
274 | 272 | except: |
|
275 | 273 | scheme = DEFAULT_SCHEME |
|
276 | 274 | _line_format = _parser.format2 |
@@ -489,14 +487,10 b' class ListTB(TBTools):' | |||
|
489 | 487 | else: |
|
490 | 488 | list.append('%s\n' % str(stype)) |
|
491 | 489 | |
|
492 | # This is being commented out for now as the __IPYTHON__ variable | |
|
493 | # referenced here is not resolved and causes massive test failures | |
|
494 | # and errors. B. Granger, 04/2009. XXX | |
|
495 | # See https://bugs.launchpad.net/bugs/362137 | |
|
496 | # # vds:>> | |
|
497 | # if have_filedata: | |
|
498 | # __IPYTHON__.hooks.synchronize_with_editor(filename, lineno, 0) | |
|
499 | # # vds:<< | |
|
490 | # vds:>> | |
|
491 | if have_filedata: | |
|
492 | ipapi.get().IP.hooks.synchronize_with_editor(filename, lineno, 0) | |
|
493 | # vds:<< | |
|
500 | 494 | |
|
501 | 495 | return list |
|
502 | 496 | |
@@ -810,17 +804,13 b' class VerboseTB(TBTools):' | |||
|
810 | 804 | value = text_repr(getattr(evalue, name)) |
|
811 | 805 | exception.append('\n%s%s = %s' % (indent, name, value)) |
|
812 | 806 | |
|
813 | # This is being commented out for now as the __IPYTHON__ variable | |
|
814 | # referenced here is not resolved and causes massive test failures | |
|
815 | # and errors. B. Granger, 04/2009. XXX | |
|
816 | # See https://bugs.launchpad.net/bugs/362137 | |
|
817 | # # vds: >> | |
|
818 | # if records: | |
|
819 | # filepath, lnum = records[-1][1:3] | |
|
820 | # #print "file:", str(file), "linenb", str(lnum) # dbg | |
|
821 | # filepath = os.path.abspath(filepath) | |
|
822 | # __IPYTHON__.hooks.synchronize_with_editor(filepath, lnum, 0) | |
|
823 | # # vds: << | |
|
807 | # vds: >> | |
|
808 | if records: | |
|
809 | filepath, lnum = records[-1][1:3] | |
|
810 | #print "file:", str(file), "linenb", str(lnum) # dbg | |
|
811 | filepath = os.path.abspath(filepath) | |
|
812 | ipapi.get().IP.hooks.synchronize_with_editor(filepath, lnum, 0) | |
|
813 | # vds: << | |
|
824 | 814 | |
|
825 | 815 | # return all our info assembled as a single string |
|
826 | 816 | return '%s\n\n%s\n%s' % (head,'\n'.join(frames),''.join(exception[0]) ) |
General Comments 0
You need to be logged in to leave comments.
Login now