forked from pteichman/python-cmdparse
A command line parser for CVS-like commands, integrated with optparse
License
jmoiron/python-cmdparse
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
cmdparse is a command line parser that works with CVS style commands. Each command can have its own optparse settings. Install it with the usual setuptools usage: $ python setup.py install Example usage: import cmdparse class EchoCommand(cmdparse.Command): def __init__(self): cmdparse.Command.__init__(self, "echo", summary="echo a string") self.add_option("-c", "--count", type="int", default="1", help="number of times to echo") def run(self, options, args): for i in xrange(options.count): print " ".join(args) parser = cmdparse.CommandParser() parser.add_command(EchoCommand()) (command, options, args) = parser.parse_args() command.run(options, args)
About
A command line parser for CVS-like commands, integrated with optparse
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Python 100.0%