My original code like the following works well with command line calls. However, is there a way that I could parse a list of arguments as a string in Python?
Example:
parser = argparse.ArgumentParser()
parser.parse_args()
And you call:
python test.py <args like --a 1 --b 2 ...>
Then if I have a string s
which is the args
list above, is there a way I could get that parsed?