I have 4 arguments eg: a,b,c,d. Users have the option to enter a or b or c or d else a or c else enter 'a' only or 'd' only like that follow all probability. for that how to write the argument parser.
subscription_parser = argparse.ArgumentParser()
subscribe_parent = argparse.ArgumentParser(add_help=False)
stream_parsers = subscription_parser.add_subparsers(title='subcommands', help='subcommand help')
stream_parser_sub = stream_parsers.add_parser('stream', parents=[subscribe_parent], help='callhome_port help')
stream_parser_sub.add_argument('stream', type=str, help='stream name')
# create_parser_filter = argparse.ArgumentParser()
filter_parser = stream_parser_sub.add_subparsers(title='subcommands', help='subcommand help')
filter_sub_parser = filter_parser.add_parser('filter',parents=[subscribe_parent], help='callhome_port help')
filter_sub_parser.add_argument('filter', type=str, help='filter value')
# create_parser_start = argparse.ArgumentParser()
start_parser = filter_sub_parser.add_subparsers(title='subcommands', help='subcommand help')
start_sub_parser = start_parser.add_parser('starttime', parents=[subscribe_parent], help='callhome_port help')
start_sub_parser.add_argument('start', type=str, help='starttime')
# create_parser_stop = argparse.ArgumentParser()
stop_parser = start_sub_parser.add_subparsers(title='subcommands', help='subcommand help')
stop_sub_parser = stop_parser.add_parser('stoptime', parents=[subscribe_parent], help='callhome_port help')
stop_sub_parser.add_argument('stop', type=str, help='stoptime')
Thanks for advance