diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-05-23 23:21:26 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-05-23 23:21:26 (GMT) |
commit | aa5a0468340338cc3423a06d6d55e1b52a713bc5 (patch) | |
tree | 71ff4e88b1e418ff32ba89ae0f4cf0b3f0d180a1 /bin/caller-tree.py | |
parent | 15bd909b178ba5271125fca6846fa8c069be79f1 (diff) | |
parent | b387e34357c968d0855c525c7e838657a957ff01 (diff) | |
download | SCons-aa5a0468340338cc3423a06d6d55e1b52a713bc5.zip SCons-aa5a0468340338cc3423a06d6d55e1b52a713bc5.tar.gz SCons-aa5a0468340338cc3423a06d6d55e1b52a713bc5.tar.bz2 |
merge python3 branch to default
Diffstat (limited to 'bin/caller-tree.py')
-rw-r--r-- | bin/caller-tree.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/caller-tree.py b/bin/caller-tree.py index 03c1616..21cda4b 100644 --- a/bin/caller-tree.py +++ b/bin/caller-tree.py @@ -39,6 +39,7 @@ # function at the same time, for example, their counts will intermix. # So use this to get a *general* idea of who's calling what, not for # fine-grained performance tuning. +from __future__ import print_function import sys @@ -74,17 +75,17 @@ for line in sys.stdin.readlines(): stack = [] def print_entry(e, level, calls): - print '%-72s%6s' % ((' '*2*level) + e.file_line_func, calls) + print('%-72s%6s' % ((' '*2*level) + e.file_line_func, calls)) if e in stack: - print (' '*2*(level+1))+'RECURSION' - print + print((' '*2*(level+1))+'RECURSION') + print() elif e.called_by: stack.append(e) for c in e.called_by: print_entry(c[0], level+1, c[1]) stack.pop() else: - print + print() for e in [ e for e in AllCalls.values() if not e.calls ]: print_entry(e, 0, '') |