This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients GraylinKim, bethard, denilsonsa, eric.araujo, paul.j3, rurpy2, zbysz
Date 2014-05-13.01:38:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399945127.13.0.661388279597.issue12806@psf.upfronthosting.co.za>
In-reply-to
Content
An alternative to passing a Formatter instance to the parser is to use a wrapper function.  `HelpFormatter.__init__` takes several keyword args. '_get_formatter' does not use those.  However we could define:

    def format_wrapper(**kwargs):
        # class 'factory' used to give extra parameters
        def fnc(prog):
            cls = argparse.HelpFormatter
            return cls(prog, **kwargs)
        return fnc

and use that to set the 'width' of the formatter object.

    parser =  argparse.ArgumentParser( formatter_class =  format_wrapper(width=40))
History
Date User Action Args
2014-05-13 01:38:47paul.j3setrecipients: + paul.j3, bethard, eric.araujo, zbysz, denilsonsa, rurpy2, GraylinKim
2014-05-13 01:38:47paul.j3setmessageid: <1399945127.13.0.661388279597.issue12806@psf.upfronthosting.co.za>
2014-05-13 01:38:47paul.j3linkissue12806 messages
2014-05-13 01:38:46paul.j3create