summaryrefslogtreecommitdiff
path: root/Lib/pstats.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-09 08:25:29 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-09 08:25:29 +0000
commit1cb59e2d2a5f9ad6001ffbaab1a4939ed1dba935 (patch)
tree426c9ff9ace823a2615646ab5eaa77d87a7bf834 /Lib/pstats.py
parentde7ef6edb8c8d61f5f8da1d9d24dad7ec78ffa40 (diff)
downloadcpython-1cb59e2d2a5f9ad6001ffbaab1a4939ed1dba935.tar.gz
String method conversion.
Diffstat (limited to 'Lib/pstats.py')
-rw-r--r--Lib/pstats.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 9923b95be0..764d89c95e 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)