I am planing to write a command using the argparse library, this is my command structure:
$ python cvs.py -d my_adress local diff -r xyz -N -d details
Here, the local has multiple command grouped to it such as local commit, local add etc. E.g. [-d my_address] is parsed in main and all switches after local diff are parsed together by a function executed for local diff.
Similarly, there is another command group parallel to local; say global.
The switch -d is not mixed with -r. So, the parser parsing -r doesn't know about -d and vice versa.
Is it possible to implement this using argparse? If yes, can somebody suggest me a rough algorithm to do this. If no, What are other possible way to do this in python? Thanks.