ARTICLE AD BOX
Using argparse, I'd like to support the following syntax:
asm2k.py -o XXXXX bbl.asmSpecifically, the -o option can take 1 or more letters, where the letters are from the set of "ARLQTNZCFXPB".
My attempt with just ABC for brevity:
parser.add_argument('-o', '--options', nargs='+', choices=('A','B','C'), help='Control Options')But this doesn't allow combinations like -o AC or -o BCA. Is this use case supported?
24.4k7 gold badges69 silver badges85 bronze badges
New contributor
jwest is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
