argsparse: allowing --version without mandatory options
"Loris Bennett" <[email protected]>
| Newsgroups | gmane.comp.python.general |
|---|---|
| Organization | FUB-IT, Freie Universität Berlin |
| Message-ID | <[email protected]> |
Hi, I am writing a program for the command-line which uses 'argsparse'. I want to make some options mandatory by setting 'required=True', but still allow the program to run with the option '--version' (which just shows the version and then exits) even if the mandatory options are missing. Is there a standard way of doing this? Cheers, Loris -- This signature is currently under constuction.