I have multiple levels of subparsers within subparsers, but when I run the program with help flag, I see help messages and choices only for top level options. How can I see help for all suboptions, or for specific suboption in deeper level?
Asked
Active
Viewed 822 times
1
-
It would be helpful if you included the code you have that relates to the argument parsers. – Don Cruickshank May 06 '15 at 22:33
1 Answers
4
To get the help for a subparser, use a command like python prog.py cmd1 -h
. To get the help for a sub-subparser, python prog.py cmd1 cmd12 -h
should work.
There isn't a means, with the default help mechanism, to show the help for the main parser and all the subparsers (and sub-subparsers) with one command. It just gets too complicated.
I'd suggest custom usage and description. That includes titles and descriptions for the subparsers, etc.

hpaulj
- 221,503
- 14
- 230
- 353