I'm trying to implement some simple command line options.
Some of the 'help' sections are long and I would like to
control line breaks. How do you do this?
I had this problem earlier and solved it here:
http://groups.google.com/group/comp....f28e26af0699b1
thanks to a little guidance from Ben Finney on where to look.
It came up again last month here:
http://groups.google.com/group/comp....deee779d9989b/
which should solve the problem for you.
ASIDE: I've started refactoring this bit out in my local
source...how would I go about contributing it back to the Python
code-base? I didn't get any feedback from posting to the Optik
site. My refactor basically takes an optional pre-processing
function to parse your string into the output that gets passed to
textwrap.wrap() and textwrap.fill(), defaulting to the old
behavior, but offering a function for splitting it into
paragraphs based on newlines.
-tkc