CommandTool is a Python module that offers tools for creating command-line interfaces involving sub-commands.
The code is based on the blog post at http://jimmyg.org/blog/2009/python-command-line-interface-(cli)-with-sub-commands.html but see the documentation in the doc directory of the source distribution for full information.
Product's homepage
Requirements:
· Python
What's New in This Release: [ read full changelog ]
· Added support for extra information in command-specific help, not shown on the command index page
· Added a bag argument and default alias look up on self so that commands behave a bit like Marbles
· Added instance, raw_args and raw_opts to the cmd object passed to run() and deprecated the use of on_initial_convert()
· Moved the bag argument out of run() and instead it gets passed as a service by PipeStack if needed. Can be accessed as cmd.service in your run() function.
· Changed the command structure to be that of a list of tuples, rather than a dictionary; nesting now happens by placing a list of tuples as a value