paul j3 added the comment:

That original template can also be implemented with a customized 'format_help':

    def custom_help(self):
        formatter = self._get_formatter()
        formatter.add_text('My Program, version 3.5')
        formatter.add_usage(self.usage, self._actions,
                        self._mutually_exclusive_groups,
                        prefix='Usage: ')
        formatter.add_text('Some description of my program')
        for action_group in self._action_groups:
            with formatter.add_section(action_group.title):
                formatter.add_text(action_group.description)
                formatter.add_arguments(action_group._group_actions)
        formatter.add_text('My epilog text')
        return formatter.format_help()

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11695>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to