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 bethard
Recipients bethard, sandro.tosi, techtonik
Date 2011-03-26.12:28:25
SpamBayes Score 2.4315217e-11
Marked as misclassified No
Message-id <1301142511.03.0.0148667867898.issue7284@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure about the usage_template approach - seems like it might be hard to make it work, while still supporting formatter_class. (Though maybe it's not so bad since the formatter class methods are all considered implementation details.) I'm open to patches though if you're willing to provide one.

In the meantime, a simple approach that will work is to override format_help():

class MyArgumentParser(argparse.ArgumentParser):
    def format_help(self):
        help = super(MyArgumentParser, self).format_help()
        return headline + '\n' + help
History
Date User Action Args
2011-03-26 12:28:31bethardsetrecipients: + bethard, techtonik, sandro.tosi
2011-03-26 12:28:31bethardsetmessageid: <1301142511.03.0.0148667867898.issue7284@psf.upfronthosting.co.za>
2011-03-26 12:28:25bethardlinkissue7284 messages
2011-03-26 12:28:25bethardcreate