argh
argh copied to clipboard
Argument groups
http://docs.python.org/dev/library/argparse.html#argument-groups
Note: This issue has been automatically migrated from Bitbucket Created by @neithere on 2012-12-23 02:43:49+00:00
+1! This is a really important one for me.
When printing help output, I want something like the following:
#!bash
usage: prog [-h][-v] COMMAND
COMMANDS:
cmd1 description of cmd1
cmd2 description of cmd2
...
And so on.
The help output's default "headings" ("positional arguments" and "optional arguments") are sensible generics, but I want more fine-grained customization of the output.
Other ways to customize the output would be awesome, too.
Apart from that, I am loving this package! Thanks so much. In all other respects, it beats the pants off of argparse!
Note: This comment has been automatically migrated from Bitbucket Created by Zearin on 2013-01-28 16:52:35+00:00
I am writing a command line tool, that has quite many commands of which three share a common group of parameters - for defining a criteria for selecting something. These three commands have more parameters that are not shared. For the common group I created a new decorator (the criteria consists of many options) that adds them to a function and the function is expected to parse them from **kwargs
by another function (other parameters not in this group are passed by name).
ArgumentParser
has an .add_argument_group()
method, that could be used to visually separate arguments in a group for the help screen, but I could not find a way to use it with argh
as a user.