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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.