I implemented in my python code a callback for variable arguments, similar to what can be found here:
hxxp: //docs.python.org/library/optparse.html#callback-example-6-variable-arguments
Adding an option as follows:
parser.add_option("-c", "--callback", dest="vararg_attr", action="callback", callback=vararg_callback)
The problem is that for the user there is no indication of the need for additional input:
Options:
-h, --help show this help message and exit
-c, --callback
Is there a way to change the use of optparse so that the use prints something like:
-c=LIST, --callback=LIST
Thank you for your help! Ben
Ben
source
share