From 2f3ac42153e329f21fe1df0a6aaa3ad84823286d Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Fri, 10 Sep 2010 12:53:20 -0400 Subject: [PATCH] Improved DataStream record format --- cuburnlib/ptx.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cuburnlib/ptx.py b/cuburnlib/ptx.py index 0ebaa00..f25c47e 100644 --- a/cuburnlib/ptx.py +++ b/cuburnlib/ptx.py @@ -1118,12 +1118,12 @@ class DataStream(PTXFragment): if cell.texp is None: print '%3d %2d --' % (cell.offset, cell.size) continue - print '%3d %2d %4s %s' % (cell.offset, cell.size, - cell.texp.type, - struct.unpack(cell.texp.type, - stream[cell.offset:cell.offset+cell.size])) - for exp in cell.texp.exprlist: - print '%11s %s' % ('', exp) + s = '%3d %2d %4s' % (cell.offset, cell.size, cell.texp.type) + vals = struct.unpack(cell.texp.type, + stream[cell.offset:cell.offset+cell.size]) + for val, exp in zip(vals, cell.texp.exprlist): + print '%11s %-20s %s' % (s, val, exp) + s = '' print '\n----\n' if limit is not None: limit -= 1