store_true 是指触发action时为真,不触发则为假。
parser.add_argument('-c', action='store_true')#store_true表示出现-c时,要执行-c操作
python test.py -c => c是true(触发)
python test.py => c是false(无触发)
store_true 是指触发action时为真,不触发则为假。
parser.add_argument('-c', action='store_true')#store_true表示出现-c时,要执行-c操作
python test.py -c => c是true(触发)
python test.py => c是false(无触发)