Re: Small additions to optparser
Gustavo Niemeyer <[email protected]> Tue, 4 May 2004 10:50:43 -0300
| Newsgroups | gmane.comp.python.devel,gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
> > - Add a help formatter which uses capitalized headers.
>
> Sure, looks simple enough.
Great! Thanks!
> How is that different from the existing 'description' that David
> Goodger added for Optik 1.4?
Here is real example. I have the following help text:
HELP = """\
Usage: repsys COMMAND [COMMAND ARGUMENTS]
Useful commands:
co
submit
create
getspec
getsrpm
changed
authoremail
Run "repsys COMMAND --help" for more information.
"""
Using OptionParser(description=HELP) and "repsys --help", I get:
"""
Usage: repsys [options]
Usage: repsys COMMAND [COMMAND ARGUMENTS] Useful commands:
co submit create getspec getsrpm changed
authoremail Run "repsys COMMAND --help" for more information.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
--debug
"""
While using OptionParser(help=HELP) and "repsys --help", I get:
"""
Usage: repsys COMMAND [COMMAND ARGUMENTS]
Useful commands:
co
submit
create
getspec
getsrpm
changed
authoremail
Run "repsys COMMAND --help" for more information.
"""
[...]
> So either post your patches to [email protected], or
> file 'em on the Optik tracker at SF. Nothing wrong with cc'ing
> python-dev at the same time, though.
Will do that. Thanks!
--
Gustavo Niemeyer
http://niemeyer.net
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-python-dev%40m.gmane.org