# HG changeset patch # User Jeff Hammel # Date 1333123986 25200 # Node ID 406183d93e48d7da9e8c089dcd9c853c7d1f8110 # Parent d36032625794019074983b4a776a291bb25c198f whitespace diff -r d36032625794 -r 406183d93e48 commandparser/command.py --- a/commandparser/command.py Fri Mar 30 09:00:18 2012 -0700 +++ b/commandparser/command.py Fri Mar 30 09:13:06 2012 -0700 @@ -43,9 +43,9 @@ OptionParser.add_option(self, *args, **kwargs) def print_help(self): - + OptionParser.print_help(self) - + # short descriptions for commands command_descriptions = [dict(name=i, description=self.commands[i]['doc'].strip().split('\n',1)[0]) @@ -61,7 +61,7 @@ def parse(self, args=sys.argv[1:]): """global parse step""" - + self.options, args = self.parse_args(args) # help/sanity check -- should probably be separated @@ -184,7 +184,7 @@ Parse a docstring and get at the section describing arguments - decoration: decoration character - delimeter: delimter character - + Yields a tuple of the stripped docstring and the arguments help dictionary """ @@ -237,5 +237,5 @@ if value is not None: help += ' [DEFAULT: %s]' % value parser.add_option('--%s' % key, help=help, default=value) - + return parser