[Python-Dev] Small additions to optparser
Edward Loper
edloper at gradient.cis.upenn.edu
Fri Apr 30 12:24:20 EDT 2004
[Gustavo Niemeyer wrote]
>> Hi Folks,
>>
>> I have two small customizations I've used in most projects I've
>> plugged optparse into. [...]
[Dan Gass wrote]
> It would be nice to have a way for the white space to be cleaned up in
> the help string. This would be useful when using multiline triple
> quoted strings to pass in help text to the option parser and you want to
> indent the help text on each line so the source code reads well.
There's already code to do this type of clean-up in inspect.getdoc().
Maybe it could be copied (or moved out of getdoc() into its own function
and reused).
-Edward
More information about the Python-Dev
mailing list