option_list = [
make_option("-i", "--adapter", action="store",
type="string", dest="dev_id"),
make_option("-b", "--device", action="store",
type="string", dest="address"),
]
parser = OptionParser(option_list=option_list)
(options, args) = parser.parse_args()
In the above code snippet, what value does args
contain?
- when I try to print
len(args)
, I am getting0
even though I am passing 2 arguments via command line - when I try to print just
args
it just prints[]
.
what actually is the use of that parameter and what does it contain?