Message 291870 - Python tracker

Message291870

Author louielu
Recipients Aaron.Meurer, Daniel.Walsh, Ingo.Fischer, Oz.Tiram, acucci, adregner, andialbrecht, bethard, bignose, bochecha, dmalcolm, eric.araujo, josh.r, jwilk, louielu, matthewjohn, paul.j3, rhettinger, serhiy.storchaka, sigi, tshepang, zbysz
Date 2017-04-19.10:13:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492596806.79.0.23712655097.issue14102@psf.upfronthosting.co.za>
In-reply-to
Content
> How to use this feature?
> argparse is executed every time when the end user runs the program.
> But generating a man page is the action that should be executed at
> develop or build stage.
> ...
> How generating a man page should be invoked?

For now, man page will only be generated by using `print_manpage` function, and argparse won't add a shortcut like help page (-h).

Developer can use `parser.add_manpage_section` to add custom manpage section, e.g. copyright, report bugs.

The only thing that will affect it that `add_manpage_section` will be adding at runtime, but user won't used it.


> The end user gets a generated man page, he doesn't need the option to generate a man page on a fly. The developer needs the ability to generate a man page rather than running the program for its main purpose.

Yes, this patch will only offer the ability to generate man page, but if developer want to build with `setup.py`, it still need to combine them.


> What should be the structure of the program that uses argparse for parsing arguments and for generating a man page?

It won't need additional change, just used current method and it will work.
History
Date User Action Args
2017-04-19 10:13:26louielusetrecipients: + louielu, rhettinger, bethard, jwilk, eric.araujo, zbysz, dmalcolm, Aaron.Meurer, bignose, andialbrecht, bochecha, tshepang, paul.j3, sigi, Daniel.Walsh, serhiy.storchaka, Ingo.Fischer, adregner, josh.r, Oz.Tiram, acucci, matthewjohn
2017-04-19 10:13:26louielusetmessageid: <1492596806.79.0.23712655097.issue14102@psf.upfronthosting.co.za>
2017-04-19 10:13:26louielulinkissue14102 messages
2017-04-19 10:13:26louielucreate