Show More
@@ -28,11 +28,12 b' http://www.python.org/2.2.3/license.html"""' | |||
|
28 | 28 | import bdb |
|
29 | 29 | import functools |
|
30 | 30 | import inspect |
|
31 | import linecache | |
|
31 | 32 | import sys |
|
32 | 33 | import warnings |
|
33 | 34 | |
|
34 | 35 | from IPython import get_ipython |
|
35 |
from IPython.utils import PyColorize |
|
|
36 | from IPython.utils import PyColorize | |
|
36 | 37 | from IPython.utils import coloransi, py3compat |
|
37 | 38 | from IPython.core.excolors import exception_colors |
|
38 | 39 | from IPython.testing.skipdoctest import skip_doctest |
@@ -407,7 +408,7 b' class Pdb(OldPdb):' | |||
|
407 | 408 | ret.append(u'%s(%s)%s\n' % (link,lineno,call)) |
|
408 | 409 | |
|
409 | 410 | start = lineno - 1 - context//2 |
|
410 |
lines = |
|
|
411 | lines = linecache.getlines(filename) | |
|
411 | 412 | start = min(start, len(lines) - context) |
|
412 | 413 | start = max(start, 0) |
|
413 | 414 | lines = lines[start : start + context] |
@@ -466,7 +467,7 b' class Pdb(OldPdb):' | |||
|
466 | 467 | filename = self._exec_filename |
|
467 | 468 | |
|
468 | 469 | for lineno in range(first, last+1): |
|
469 |
line = |
|
|
470 | line = linecache.getline(filename, lineno) | |
|
470 | 471 | if not line: |
|
471 | 472 | break |
|
472 | 473 |
General Comments 0
You need to be logged in to leave comments.
Login now