[issue46142] python --help output is too long

2022-01-11 Thread Éric Araujo
Éric Araujo added the comment: The PR now has --help-env, --help-xoptions and --help-all ! -- ___ Python tracker ___ ___ Python-bugs

[issue46142] python --help output is too long

2022-01-10 Thread Éric Araujo
Éric Araujo added the comment: BTW on the PR I am asking for help with string formatting, to print an invalid X option (a wchar_t string) using the PyStatus API (needs char). Help from a proper C programmer would be appreciated :) -- ___ Python tr

[issue46142] python --help output is too long

2022-01-10 Thread Éric Araujo
Éric Araujo added the comment: > For me, the best CLI is "git help", "git help init", etc. I don’t think that prior art applies here, as python does not have subcommands. `--help` and `--help-env` are straightforward, `-X help` is a bit unusual but at least it’s part of the optional `-X` opt

[issue46142] python --help output is too long

2022-01-10 Thread Eryk Sun
Eryk Sun added the comment: > Do you know other projects which dump the full help into stdout > when asking for the "full help"? `ps --help` lists sections "". The "--help all" output is all sections, but truly all help is only available via `man ps`. > For me, the best CLI is "git help", "

[issue46142] python --help output is too long

2022-01-10 Thread STINNER Victor
STINNER Victor added the comment: > Serhiy: What do you think about -hh (and maybe —help-full) printing full help? Do you know other projects which dump the full help into stdout when asking for the "full help"? For me, the best CLI is "git help", "git help init", etc. "git help init" opens

[issue46142] python --help output is too long

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: I hard forgotten this bit in the email thread: Serhiy: What do you think about -hh (and maybe —help-full) printing full help? Guidp: Is there enough of a use case for this to bother? Barry: Maybe not. I’d say if it was easy to implement, why not, but if it’s a

[issue46142] python --help output is too long

2022-01-06 Thread STINNER Victor
STINNER Victor added the comment: "xoptions" name comes from sys._xoptions (Python) and PyConfig.xoptions (C). Oh, sys._xoptions is a private API... but it's mentioned in the -X documentation: https://docs.python.org/3/using/cmdline.html#cmdoption-X -- __

[issue46142] python --help output is too long

2022-01-06 Thread Éric Araujo
Éric Araujo added the comment: Victor said on github that he would prefer `--help-xoptions` to `-X help`. It would align with `--help` and `--help-env`, but not with other `-X abc` options. I think that `--help-X` may be better, as it uses the same form (`X`) rather than the non-word `xopti

[issue46142] python --help output is too long

2022-01-05 Thread STINNER Victor
STINNER Victor added the comment: initconfig.c parses all -X options. preconfig.c also checks for a few specific -X options which are also checked in initconfig.c. My notes on parsing command line options: https://pythondev.readthedocs.io/pyconfig.html#add-a-new-command-line-option -

[issue46142] python --help output is too long

2022-01-01 Thread Éric Araujo
Change by Éric Araujo : -- keywords: +patch pull_requests: +28546 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30331 ___ Python tracker __

[issue46142] python --help output is too long

2022-01-01 Thread Éric Araujo
Éric Araujo added the comment: It seems that preconfig is only for some options that change fundamental behaviour (isolated mode, default encoding), so I should be able to detect and handle '-X help' in initconfig. -- ___ Python tracker

[issue46142] python --help output is too long

2022-01-01 Thread Éric Araujo
Éric Araujo added the comment: Question about the implementation: I’ve found the parsing of command-line params in Python/initconfig.c and Python/preconfig.c. Help is handled in initconfig, X options in preconfig. A) could add a value to the right struct for "-X help", set it in preconfig, ha

[issue46142] python --help output is too long

2021-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the man page should contain all details related to the CLI (and may be even some examples). -- ___ Python tracker ___ ___

[issue46142] python --help output is too long

2021-12-31 Thread Éric Araujo
Éric Araujo added the comment: Do people think the man page should be shortened too? -- ___ Python tracker ___ ___ Python-bugs-list

[issue46142] python --help output is too long

2021-12-20 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue46142] python --help output is too long

2021-12-20 Thread Éric Araujo
Éric Araujo added the comment: Forgot to quote -X help to print help about X options. -- components: +Interpreter Core ___ Python tracker ___

[issue46142] python --help output is too long

2021-12-20 Thread Éric Araujo
New submission from Éric Araujo : >From Serhiy in >https://mail.python.org/archives/list/python-...@python.org/thread/QUUBM7DGSXYWBOLZNWOSCQUDALWJIYZF/ > : The output of "python -h" is 104 lines long now. It was only 51 lines in 3.6. 35% of it is about the -X option, and 30% about envir