Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个argparse.ArgumentParser()对象,直接从sys.argv. 我想在某些地方覆盖列表,并将参数列表直接传递给ArgumentParser().
argparse.ArgumentParser()
sys.argv
ArgumentParser()
可能吗?
my_args = sys.argv # do something to my_args # ... parser.parse_args(my_args)