Hi Steven,
How can I use the argparse in this way:
>> prog option1 {only cmd1 and cmd2 are available}
>> prog option2 {only cmd3 and cmd4 are available}
NOTE: each cmd{#} defined as a subparser with its unique set of
parameters.
It's close to the behavior of "svn commit" for example with an
addition of a mandatory
parameter before any subparser, this parameter determines which
subparser to call, say:
"svn local commit" is legal but if "remote" is used instead of "local"
the "commit" option
won't be available at all and the user may use "svn remote copy" for
example.
I tried to define nested subparsers but got: "cannot have multiple
subparser arguments".
May be I'm missing something but currently I'm unable to reach the
desired behavior.
TIA,
MaxB.