diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 08:25:29 (GMT) |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-09 08:25:29 (GMT) |
commit | 373c55e510f91fe2031bfb91e72fbf5d81c3915f (patch) | |
tree | 0ae98db0b1d2adfd2a249df6130332bb1426e82e /Lib/pstats.py | |
parent | 9b93c5f248f9c1cab891dd58d519425ec9f838bd (diff) | |
download | cpython-373c55e510f91fe2031bfb91e72fbf5d81c3915f.zip cpython-373c55e510f91fe2031bfb91e72fbf5d81c3915f.tar.gz cpython-373c55e510f91fe2031bfb91e72fbf5d81c3915f.tar.bz2 |
String method conversion.
Diffstat (limited to 'Lib/pstats.py')
-rw-r--r-- | Lib/pstats.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py index 9923b95..764d89c 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -34,7 +34,6 @@ import os import time -import string import marshal import re @@ -392,11 +391,11 @@ class Stats: return self def print_call_heading(self, name_size, column_title): - print string.ljust("Function ", name_size) + column_title + print "Function ".ljust(name_size) + column_title def print_call_line(self, name_size, source, call_dict): - print string.ljust(func_std_string(source), name_size), + print func_std_string(source).ljust(name_size), if not call_dict: print "--" return @@ -414,11 +413,11 @@ class Stats: def print_title(self): - print string.rjust('ncalls', 9), - print string.rjust('tottime', 8), - print string.rjust('percall', 8), - print string.rjust('cumtime', 8), - print string.rjust('percall', 8), + print 'ncalls'.rjust(9), + print 'tottime'.rjust(8), + print 'percall'.rjust(8), + print 'cumtime'.rjust(8), + print 'percall'.rjust(8), print 'filename:lineno(function)' @@ -427,7 +426,7 @@ class Stats: c = `nc` if nc != cc: c = c + '/' + `cc` - print string.rjust(c, 9), + print c.rjust(9), print f8(tt), if nc == 0: print ' '*8, @@ -522,4 +521,4 @@ def count_calls(callers): #************************************************************************** def f8(x): - return string.rjust(fpformat.fix(x, 3), 8) + return fpformat.fix(x, 3).rjust(8) |