[issue4318] optparse: formatting of help text/descriptions

A.M. Kuchling report at bugs.python.org
Fri Nov 14 01:37:45 CET 2008


New submission from A.M. Kuchling <lists at amk.ca>:

(Copied from an anonymous submission 
in the Optik bug tracker.)

There have been some recent discussions on comp.lang.python about the
optparse/optik module, and Steve Bethard suggested you might be interested
in some of the work done there. I don't know if you'd find any of this
helpful for inclusion in Optik/optparse, but Steve says it's come up on
your mailing list too.

The problem at hand involves formatting help-strings so that they respect
newlines. Simply passing formatted help-strings off to the textwrap.*
methods mungs the newlines and loses them.

The original thread:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/6df6e6
b541a15bc2/acf1d05cad60fc45?#acf1d05cad60fc45

My solution:
http://groups.google.com/group/comp.lang.python/msg/09f28e26af0699b1

Dan then asked about it, and took my solution and ran with it:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/e72dee
e779d9989b/4ec68cd2a35d52e1?hl=en#4ec68cd2a35d52e1

Feel free to do with it as you like.

----------
components: Library (Lib)
messages: 75846
nosy: akuchling
severity: normal
status: open
title: optparse: formatting of help text/descriptions
type: feature request
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4318>
_______________________________________


More information about the Python-bugs-list mailing list