Re: optparse: add trailing text in help message?

2006-10-14 Thread Steven Bethard
Duncan Booth wrote: from optparse import OptionParser usage = "usage: %prog [options] arg1 arg2" epilog = "that's all folks!" parser = OptionParser(usage=usage, epilog=epilog) parser.parse_args(['', '--help']) > Usage: [options] arg1 arg2 > > Options: > -h, --help show

Re: optparse: add trailing text in help message?

2006-10-14 Thread Count László de Almásy
Thanks for the help, all. Somone pointed out the 'epilogue' attribute to OptionParser that is new in Python 2.5, which does exactly what I am looking for. I did read the optparse docs for 2.5 fully before posting this question, and now that I've taken a second look, I see that epilog is NOT DOCUM

Re: optparse: add trailing text in help message?

2006-10-14 Thread Duncan Booth
"Count László de Almásy" <[EMAIL PROTECTED]> wrote: > Is there a standard way with optparse to include a blurb of text after > the usage section, description, and the list of options? This is > often useful to include examples or closing comments when the help > message is printed out. Many of t

Re: optparse: add trailing text in help message?

2006-10-14 Thread Steven Bethard
Count László de Almásy wrote: > Is there a standard way with optparse to include a blurb of text after > the usage section, description, and the list of options? This is > often useful to include examples or closing comments when the help > message is printed out. Many of the GNU commands do this

Re: optparse: add trailing text in help message?

2006-10-13 Thread James Stroud
Count László de Almásy wrote: > Is there a standard way with optparse to include a blurb of text after > the usage section, description, and the list of options? This is > often useful to include examples or closing comments when the help > message is printed out. Many of the GNU commands do this

optparse: add trailing text in help message?

2006-10-13 Thread Count László de Almásy
Is there a standard way with optparse to include a blurb of text after the usage section, description, and the list of options? This is often useful to include examples or closing comments when the help message is printed out. Many of the GNU commands do this. It would look something like this: