diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-24 07:32:15 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-24 07:32:15 -0500 |
commit | 8da6001179ca8cbf46fab21142c19ea27426dc20 (patch) | |
tree | 0f09f1bed494b490842815b7842db15f5ef3a612 /igor.py | |
parent | e28ed45a006ac543d3cdc430264d2ab3d5ed265d (diff) | |
download | python-coveragepy-8da6001179ca8cbf46fab21142c19ea27426dc20.tar.gz |
Add a help function to igor
Diffstat (limited to 'igor.py')
-rw-r--r-- | igor.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -123,6 +123,15 @@ def print_banner(label): print('=== %s %s %s (%s) ===' % (impl, version, label, sys.executable)) +def do_help(args): + """List the available commands""" + items = globals().items() + items.sort() + for name, value in items: + if name.startswith('do_'): + print "%-20s%s" % (name[3:], value.__doc__) + + def main(args): handler = globals().get('do_'+args[0]) if handler is None: |