Show More
@@ -32,7 +32,7 b' import sys' | |||
|
32 | 32 | |
|
33 | 33 | from IPython.utils import PyColorize, ulinecache |
|
34 | 34 | from IPython.core import ipapi |
|
35 | from IPython.utils import coloransi, io, openpy | |
|
35 | from IPython.utils import coloransi, io, openpy, py3compat | |
|
36 | 36 | from IPython.core.excolors import exception_colors |
|
37 | 37 | |
|
38 | 38 | # See if we can use pydb. |
@@ -310,10 +310,10 b' class Pdb(OldPdb):' | |||
|
310 | 310 | |
|
311 | 311 | Colors = self.color_scheme_table.active_colors |
|
312 | 312 | ColorsNormal = Colors.Normal |
|
313 | tpl_link = '%s%%s%s' % (Colors.filenameEm, ColorsNormal) | |
|
314 | tpl_call = '%s%%s%s%%s%s' % (Colors.vName, Colors.valEm, ColorsNormal) | |
|
315 | tpl_line = '%%s%s%%s %s%%s' % (Colors.lineno, ColorsNormal) | |
|
316 | tpl_line_em = '%%s%s%%s %s%%s%s' % (Colors.linenoEm, Colors.line, | |
|
313 | tpl_link = u'%s%%s%s' % (Colors.filenameEm, ColorsNormal) | |
|
314 | tpl_call = u'%s%%s%s%%s%s' % (Colors.vName, Colors.valEm, ColorsNormal) | |
|
315 | tpl_line = u'%%s%s%%s %s%%s' % (Colors.lineno, ColorsNormal) | |
|
316 | tpl_line_em = u'%%s%s%%s %s%%s%s' % (Colors.linenoEm, Colors.line, | |
|
317 | 317 | ColorsNormal) |
|
318 | 318 | |
|
319 | 319 | frame, lineno = frame_lineno |
@@ -327,7 +327,7 b' class Pdb(OldPdb):' | |||
|
327 | 327 | |
|
328 | 328 | #s = filename + '(' + `lineno` + ')' |
|
329 | 329 | filename = self.canonic(frame.f_code.co_filename) |
|
330 | link = tpl_link % filename | |
|
330 | link = tpl_link % py3compat.cast_unicode(filename) | |
|
331 | 331 | |
|
332 | 332 | if frame.f_code.co_name: |
|
333 | 333 | func = frame.f_code.co_name |
@@ -348,7 +348,7 b' class Pdb(OldPdb):' | |||
|
348 | 348 | ret.append('> ') |
|
349 | 349 | else: |
|
350 | 350 | ret.append(' ') |
|
351 | ret.append('%s(%s)%s\n' % (link,lineno,call)) | |
|
351 | ret.append(u'%s(%s)%s\n' % (link,lineno,call)) | |
|
352 | 352 | |
|
353 | 353 | start = lineno - 1 - context//2 |
|
354 | 354 | lines = ulinecache.getlines(filename) |
@@ -425,7 +425,7 b' class Pdb(OldPdb):' | |||
|
425 | 425 | filename = self._exec_filename |
|
426 | 426 | |
|
427 | 427 | for lineno in range(first, last+1): |
|
428 | ulinecache.getline(filename, lineno) | |
|
428 | line = ulinecache.getline(filename, lineno) | |
|
429 | 429 | if not line: |
|
430 | 430 | break |
|
431 | 431 |
General Comments 0
You need to be logged in to leave comments.
Login now