summaryrefslogtreecommitdiff
path: root/bin/memlogs.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-09-28 12:18:58 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-09-28 12:18:58 +0200
commitbaee03c569c91b745a1e025660b19a718db16e7d (patch)
tree1aaa25835bd24c5c95649cd8ab34d97bafded599 /bin/memlogs.py
parent4c7fed99e5554ba71d62987c0ec5f1302011b122 (diff)
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'bin/memlogs.py')
-rw-r--r--bin/memlogs.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/memlogs.py b/bin/memlogs.py
index 9d957c9..b450939 100644
--- a/bin/memlogs.py
+++ b/bin/memlogs.py
@@ -21,26 +21,28 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+from __future__ import print_function
+
import getopt
import sys
filenames = sys.argv[1:]
if not filenames:
- print """Usage: memlogs.py file [...]
+ print("""Usage: memlogs.py file [...]
Summarizes the --debug=memory numbers from one or more build logs.
-"""
+""")
sys.exit(0)
fmt = "%12s %12s %12s %12s %s"
-print fmt % ("pre-read", "post-read", "pre-build", "post-build", "")
+print(fmt % ("pre-read", "post-read", "pre-build", "post-build", ""))
for fname in sys.argv[1:]:
lines = [l for l in open(fname).readlines() if l[:7] == 'Memory ']
t = tuple([l.split()[-1] for l in lines]) + (fname,)
- print fmt % t
+ print(fmt % t)
# Local Variables:
# tab-width:4