My code portion looks like:
parser.add_option("-h", "--help","-?",
action = "help",
help= """Print the help of the scipt"""
)
When I am trying to print the options available for the script, it returns an empty array.
optlist = [x.get_opt_string() for x in parser._get_all_options()[1:]]
print optlist
Printing optlist prints an empty array -> [ ].
I need to print an array with all the available options. In this case, an array that stores values: -h, --help and -?