[issue14102] argparse: add ability to create a man page

Ben Finney report at bugs.python.org
Thu Jun 14 15:34:36 EDT 2018


Ben Finney <ben+python at benfinney.id.au> added the comment:

On 14-Jun-2018, Pablo Galindo Salgado wrote:

> I think this should be something that is not included in argparse
> itself. I can imagine a scenario in which the manpage is accessible
> through `./python foo.py --manpage` but the manpage is not installed
> systemwide.

This bug report is not asking that ‘argparse’ install a manual page,
and it is not asking for any new command-line option in programs. So I
don't know the relevance of that point.

> This will be very confusing for users.

What would cause that confusion? This is not something that would
change how ‘argparse’ parses its arguments, so I don't know what
you're referring to.

> Generating a man page in a build script sounds like something that
> should be on its own or as a help function of the build system.

This is asking that the ‘argparse’ library should have an API to
create a manual page, for use in the build system.

The reason to have it in the ‘argparse’ library is that the library
already knows how to build a single document (the ‘--help’ output)
from the collection of arguments, so this would be just another
rendering of that information. It makes sense to have it in the
‘argparse’ library as an API for other tools to use.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue14102>
_______________________________________


More information about the Python-bugs-list mailing list