argparse
여러 번 존재할 수있는 두 개의 인수로 옵션을 구문 분석하려면 어떻게합니까? 이처럼 :Python의 argparse를 사용하여 두 개의 인수로 반복 옵션을 구문 분석하는 방법은 무엇입니까?
$ cmd --repo origin here --repo other there --repo upstream url3
그리고 분석 된 인수는 다음과 같이 예를 들어 액세스 할 수 있어야합니다 :
args.repo = [('origin', 'here'), ('other', 'there'), ('upstream', 'url3')]