summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-24 07:32:15 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-24 07:32:15 -0500
commit8da6001179ca8cbf46fab21142c19ea27426dc20 (patch)
tree0f09f1bed494b490842815b7842db15f5ef3a612 /igor.py
parente28ed45a006ac543d3cdc430264d2ab3d5ed265d (diff)
downloadpython-coveragepy-8da6001179ca8cbf46fab21142c19ea27426dc20.tar.gz
Add a help function to igor
Diffstat (limited to 'igor.py')
-rw-r--r--igor.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/igor.py b/igor.py
index 0a1552b..a0ddcb8 100644
--- a/igor.py
+++ b/igor.py
@@ -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: