[Gustavo Niemeyer wrote]
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).