anatoly techtonik <techto...@gmail.com> added the comment: On Sat, Mar 26, 2011 at 2:28 PM, Steven Bethard <rep...@bugs.python.org> wrote: > > 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.
The main point was to cut extra arguments in constructor that are used solely for formatting the result, but it is too late to do any changes now. > 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 Thanks. I'll try this one next time or think about the patch. ;) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7284> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com