Tim Chase <[EMAIL PROTECTED]> writes: > I've been learning the ropes of the optparse module and have been > having some trouble getting the help to format the way I want.
A quick perusal of the 'optparse.py' code shows me this: ======== [...] class OptionParser([...]): def __init__([...], formatter=None, [...]): [...] if formatter is None: formatter = IndentedHelpFormatter() [...] ======== So, the OptionParser init method accepts the help formatter as the 'formatter' argument, defaulting to a new instance of IndentedHelpFormatter. Presumably, it's a matter of subclassing 'optparse.HelpFormatter' and overriding the behaviour you want to change, then passing an instance of your new class as the 'formatter' argument to the 'OptionParser()' invocation. -- \ "Members of the general public commonly find copyright rules | `\ implausible, and simply disbelieve them." -- Jessica Litman, | _o__) _Digital Copyright_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list