python argparse extra args
问题 i would like to get extra args using argparse but without known what are they. for example, in maven we can add parameters in the form: -Dmaven.test.skip=true or -Dcmd=compiler:compile i would like to get the same thing in python using argparse , and get some kind of dict with all the args.. i know i can use: aparser.parse_known_args() but then i need to parse me extra args (remove the -D and split by = ). Was wondering if there is something out of the box? Thanks! 回答1: You can use parser.add