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