diff options
author | Nathan Binkert <nate@binkert.org> | 2009-02-15 20:39:12 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-02-15 20:39:12 -0800 |
commit | e0f425bb94a5b67c1128cc05c490dc78f0841290 (patch) | |
tree | fb749b74c49827b4a1119004a7b5ca690c926098 /src/python/m5/util | |
parent | de720838053d30defcb3b5d07b76ea599b9c05ea (diff) | |
download | gem5-e0f425bb94a5b67c1128cc05c490dc78f0841290.tar.xz |
traceflags: fix --trace-help
Diffstat (limited to 'src/python/m5/util')
-rw-r--r-- | src/python/m5/util/__init__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/python/m5/util/__init__.py b/src/python/m5/util/__init__.py index f82de696a..5c4a066c6 100644 --- a/src/python/m5/util/__init__.py +++ b/src/python/m5/util/__init__.py @@ -30,3 +30,16 @@ from attrdict import attrdict, optiondict from misc import * from multidict import multidict import jobfile + +def print_list(items, indent=4): + line = ' ' * indent + for i,item in enumerate(items): + if len(line) + len(item) > 76: + print line + line = ' ' * indent + + if i < len(items) - 1: + line += '%s, ' % item + else: + line += item + print line |