Re: feature request #1055954: respect newlines in description
Brian Dorsey <[email protected]> Thu, 10 Mar 2005 09:25:55 -0800
| Newsgroups | gmane.comp.python.optik.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 09 Mar 2005 19:49:39 -0500, Greg Ward <[email protected]> wrote: > A compelling argument would be if someone wanted multiple paragraphs in > the description. My proposed interface for that would be <snip> > So: does anyone want this feature? If so, I'll hijack Tomi's SF item > and implement it. If not -- never mind. Hmm... it looks like I've been unknowingly mis-using the OptionParser init keywords in such a way that I didn't run into this problem even though I'm using some specific formatting. I've been using 'usage' rather than 'description'. Example output: C:\aveng\Projects\Database\DBReplicationMonitor>BulkBitsAdmin.py usage: This program will change the state of all BITS jobs on this computer. Basic Usage: BulkBitsAdmin ACTION [options] ACTION The action to apply to each job. (RESUME, SUSPEND, CANCEL, COMPLETE) options: --version show program's version number and exit <snip> and in BulkBitsAdmin.py: def main(action, options): """ This program will change the state of all BITS jobs on this computer. Basic Usage: BulkBitsAdmin ACTION [options] ACTION The action to apply to each job. (RESUME, SUSPEND, CANCEL, COMPLETE) """ <snip> if __name__ == '__main__': versiontext = '%prog ' + config.version parser = optparse.OptionParser(usage=main.__doc__, version=versiontext) So... for me at least, please don't pass 'usage' through textwrap and I'll be happy. Take care, -Brian ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click