argparse: identify which subparser was used [duplicate]
This question already has answers here: Get selected subcommand with argparse (3 answers) Closed 8 years ago. I think this must be easy but I do not get it. Assume I have the following arparse parser: import argparse parser = argparse.ArgumentParser( version=’pyargparsetest 1.0′ ) subparsers = parser.add_subparsers(help=’commands’) # all all_parser = subparsers.add_parser(‘all’, help=’process all apps’) … Read more