I have a Python 3 program that uses the argparse module to collect command line arguments, and I would like to add a feature to my program so that arguments may be taken which set an arbitrary internal variable to a value at runtime.
For example: ./program.py --regular-option +myvar=apples +othervar=oranges
Is this something that argparse can handle? Otherwise, how do I prevent argparse from thinking a nonexistent option has been passed while I manually extract these options from sys.argv?