On 2007-12-08, Neil Cerutti wrote: > On 2007-12-08, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On Fri, 7 Dec 2007 20:12:21 +0000, Adam Funk <[EMAIL PROTECTED]> >> declaimed the following in comp.lang.python: >> >>> I'm using to using Pod::Usage in my Perl programs (a snipped example >>> is shown below, if you're interested) to generate a little man page >>> when they are called with the -h option. >>> >>> Is there an equivalent in Python? >>> >> I'd suggest you look in the Python references for docstring and/or >> __doc__ > > I found the example incomprehensible, so I looked it up in > perldoc.
Sorry about that! POD is a mark-up language that Perl's Pod::Usage module can translate into man pages (and other documentation formats). So what I'm really after is an easy way to generate something that looks like a man page. > Anyhow, Python doesn't have it. Combining printing > various verboseness of usage messages with setting exit codes > with calling the exit function seems a little bizarre. > > But I believe optparse will handle parsing arguments and printing > usage messages, though not, I think, setting verbosity levels and > exiting the program. Thanks. -- http://mail.python.org/mailman/listinfo/python-list