cmdln

A free and open source tool for writing multi-command scripts and shells
Download

cmdln Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Trent Mick
  • Publisher web site:
  • http://code.google.com/u/trentm/
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 85 KB

cmdln Tags


cmdln Description

A free and open source tool for writing multi-command scripts and shells cmdln fixes some of the design flaws in cmd.py and takes advantage of new Python stdlib modules (e.g. optparse) so that it is more useful (and convenient) for implementing command-line scripts/shells.The main differences are:· Instead of passing a command line to subcommand handlers, already parsed options and an args list are provided. This is much more convenient when the complexity of commands grows to have options, arguments with spaces, etc.· By default the help for a subcommand is the associated method's docstring. Default help output is much nicer and some template vars can also be used to be able to automatically fill in some details.· Defining command aliases is easy (using a new decorator).· A .main() method is provided to make using your Cmdln subclass a little cleaner.· The error handling (and associated hooks) have been improved so that trapping and dealing with errors in sub-command handlers (the do_* methods) can be done -- as might be wanted for a slighty more robust shell. What's New in This Release: · Some Python 2.6-ification. No functional change.


cmdln Related Software