Format help with underlined section headers.
| 375 | |
| 376 | |
| 377 | class TitledHelpFormatter (HelpFormatter): |
| 378 | """Format help with underlined section headers. |
| 379 | """ |
| 380 | |
| 381 | def __init__(self, |
| 382 | indent_increment=0, |
| 383 | max_help_position=24, |
| 384 | width=None, |
| 385 | short_first=0): |
| 386 | HelpFormatter.__init__ ( |
| 387 | self, indent_increment, max_help_position, width, short_first) |
| 388 | |
| 389 | def format_usage(self, usage): |
| 390 | return "%s %s\n" % (self.format_heading(_("Usage")), usage) |
| 391 | |
| 392 | def format_heading(self, heading): |
| 393 | return "%s\n%s\n" % (heading, "=-"[self.level] * len(heading)) |
| 394 | |
| 395 | |
| 396 | def _parse_num(val, type): |
no outgoing calls