[issue25307] Enhancing the argparse help output

2015-10-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +bethard versions: +Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue25307] Enhancing the argparse help output

2015-10-03 Thread paul j3
paul j3 added the comment: Formatter _format_action_invocation(self, action) is the key function. Notice how it treats positionals and optionals separately. Also it calls default = self._get_default_metavar_for_optional(action) args_string = self._format_args(action, default) to get

[issue25307] Enhancing the argparse help output

2015-10-03 Thread Sworddragon
Sworddragon added the comment: > The formatting of choices has been discussed in other bug/issues. What was the reason showing the choices only once at default was not chosen? -- ___ Python tracker ___

[issue25307] Enhancing the argparse help output

2015-10-03 Thread paul j3
paul j3 added the comment: http://stackoverflow.com/questions/18275023/dont-show-long-options-twice-in-print-help-from-argparse http://stackoverflow.com/questions/9366369/python-argparse-lots-of-choices-results-in-ugly-help-output http://stackoverflow.com/questions/23936145/python-argparse-help

[issue25307] Enhancing the argparse help output

2015-10-03 Thread paul j3
paul j3 added the comment: I don't recall other issues or discussions about lining up short and long option strings. Producing a more compact invocation has raised in StackOverflow questions. I don't recall if there has been bug/issue on the same. If I recall correctly it isn't hard to ident

[issue25307] Enhancing the argparse help output

2015-10-03 Thread Sworddragon
New submission from Sworddragon: I'm noticing some things on the argparse help output that can maybe enhanced. Here is a testcase that produces an example output: #!/usr/bin/python3 -BEOObbs # coding=utf-8 import argparse arguments = argparse.ArgumentParser() arguments.add_argument('-t', '--tes