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
commitccfcfe1cdb7b92795c551a2f774e1e39101ce7b8 (patch)
tree6e6c7bf1a087995ad49dbfd8ab58111eb7d046e8 /igor.py
parent8e5efbcc1ff25bb8af8737f30023d1a066137c5b (diff)
downloadpython-coveragepy-git-ccfcfe1cdb7b92795c551a2f774e1e39101ce7b8.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 0a1552b2..a0ddcb8e 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: