Python argparse conditional requirements

后端 未结 2 662
迷失自我
迷失自我 2021-02-18 23:47

How do I set up argparse as follows:

if -2 is on the command line, no other arguments are required
if -2 is not on the command line, -3 and -4 arguments are requ         


        
2条回答
提交回复
热议问题