[issue4256] optparse: provide a simple way to get a programmatically useful list of options

Filip Gruszczyński report at bugs.python.org
Wed Mar 31 12:54:56 CEST 2010


Filip Gruszczyński <gruszczy at gmail.com> added the comment:

Are you saying, that for example for this:

gruszczy at gruszczy-laptop:~/Programs/logbuilder$ ./logbuilder --help
Usage: logbuilder [options] repo

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -r REGEXP, --regexp=REGEXP
                        filter revisions using regular expression
  -c CONTAINS, --contains=CONTAINS
                        filter revisions that doesn't contain given string
  -s START_REV, --start=START_REV
                        first revision to be used in log
  -e END_REV, --end=END_REV
                        last revision to be used in log
  -f FILE, --file=FILE  file where result will be stored
  -t TEMPLATE, --template=TEMPLATE
                        template used to display changes
  -p PURGE, --purge=PURGE
                        remove parts of a commit messages, that match given
                        regexp

you would like to get:

gruszczy at gruszczy-laptop:~/Programs/logbuilder$ ./logbuilder --help-options

  --version
  -h, --help
  -r, --regexp
  -c, --contains
  -s, --start
  -e, --end
  -f, --file
  -t, --template
  -p, --purge

?

----------
nosy: +gruszczy

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4256>
_______________________________________


More information about the Python-bugs-list mailing list