zenlotus / argparse

Automatically exported from code.google.com/p/argparse
Other
0 stars 0 forks source link

Feature Request: Allow exclusion of argument groups from -h output #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Feature Request for Argparse version 1.1

I would like the ability to be able to toggle argument groups from being
included in the help output from --help or -h.  The use case is that I have
an arguments group that contains "advanced" arguments that are rarely used.
 I would like exclude these "advanced" arguments from the help output in
order to keep it clean.  Users would be able to see the help for these
"advanced" options by providing an additional command-line argument to turn
them on.

Note that I want these arguments to *always* be available, just not
displayed in the help output by default.

Original issue reported on code.google.com by denver.c...@gmail.com on 5 Apr 2010 at 4:39

GoogleCodeExporter commented 9 years ago
You can currently exclude individual arguments by using

    add_argument(..., help=argparse.SUPPRESS, ...)

and then they won't be included in the output, though they'll continue to be 
usable. I've filed an issue on bugs.python.org (argparse's new home) to provide 
better documentation about this:

http://bugs.python.org/issue9349

Original comment by steven.b...@gmail.com on 23 Jul 2010 at 1:47