diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 11:51:27 (GMT) |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 11:51:27 (GMT) |
commit | fc170b1fd5db978f4e8d4c23c138a7b59df681ec (patch) | |
tree | 3c73ffcba8f5ece8c64a086a362b7fbe65368048 /Lib/lib-old/tb.py | |
parent | d8c628bd59f70b5389c39fd9e6a15cb3e2d46f27 (diff) | |
download | cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.zip cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.tar.gz cpython-fc170b1fd5db978f4e8d4c23c138a7b59df681ec.tar.bz2 |
String method conversion.
Diffstat (limited to 'Lib/lib-old/tb.py')
-rw-r--r-- | Lib/lib-old/tb.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/lib-old/tb.py b/Lib/lib-old/tb.py index abe4824..57851aa 100644 --- a/Lib/lib-old/tb.py +++ b/Lib/lib-old/tb.py @@ -5,7 +5,6 @@ import sys import os from stat import * -import string import linecache def br(): browser(sys.last_traceback) @@ -35,7 +34,7 @@ def browser(tb): except EOFError: print '\n[EOF]' break - cmd = string.strip(line) + cmd = line.strip() if cmd: if cmd == 'quit': break @@ -62,8 +61,8 @@ def browserlist(tb): last = lineno first = max(1, last-10) for i in range(first, last+1): - if i == lineno: prefix = '***' + string.rjust(`i`, 4) + ':' - else: prefix = string.rjust(`i`, 7) + ':' + if i == lineno: prefix = '***' + `i`.rjust(4) + ':' + else: prefix = `i`.rjust(7) + ':' line = linecache.getline(filename, i) if line[-1:] == '\n': line = line[:-1] print prefix + line @@ -115,14 +114,14 @@ def printtbheader(tb): info = '"' + filename + '"(' + `lineno` + ')' line = linecache.getline(filename, lineno) if line: - info = info + ': ' + string.strip(line) + info = info + ': ' + line.strip() print info def printsymbols(d): keys = d.keys() keys.sort() for name in keys: - print ' ' + string.ljust(name, 12) + ':', + print ' ' + name.ljust(12) + ':', printobject(d[name], 4) print |