Re: automatically generating a help file

"David Goodger" <[email protected]> Thu, 3 Jul 2008 15:07:53 -0400
Newsgroups gmane.comp.python.optik.user
Message-ID <[email protected]>
On Thu, Jul 3, 2008 at 14:41, Scott Stagg <[email protected]> wrote:
> I am trying to write a function that will use an OptionParser object
> to generate a help file. Ultimately, I will have it generate an HTML
> file so the help doc for my program can be viewed from the web. The
> problem I'm having is that I can't figure out how to have
> OptionParser return a list of the names of the options I have
> defined and the corresponding help information. Does anyone have a
> suggestion on how I could do this?

No, but I have an alternative. Use
"formatter=optparse.TitledHelpFormatter" and run the resulting help
text through Docutils to get your HTML.

-- 
David Goodger <http://python.net/~goodger>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08