I have utility which pass multiple argument alongwith require element Could anyone provide some input How can I handle this scenario using argparse. Please find the sample code
#! /usr/bin/env python
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-cdl", dest = "input_file")
args = parser.parse_args()
print args
Command Line : python test_6.py -cdl sample (workfine)
utility also pass : python test_6.py -cdl sample -cdl-sp -cdl-ck
The last two argument for tool.As my program I need to take sample file and ignore rest two argument without any error.In current code, it give me error