[Tutor] Groups of mutually exclusive options
Steven D'Aprano
steve at pearwood.info
Tue Apr 22 05:17:28 CEST 2014
On Mon, Apr 21, 2014 at 05:05:49PM -0400, rail shafigulin wrote:
> Does anybody know if there is a way to specify groups of mutually exclusive
> options using argparse module?
I'm not an expert on argparse, but I think not. If I've understand
correctly, this seems to suggest that argparse does not support what you
want:
http://stackoverflow.com/questions/4770576/does-argparse-python-support-mutually-exclusive-groups-of-arguments
If I've misunderstood what you are after, there are very many variations
on the theme of mutually exclusive groups of arguments on Stackoverflow,
perhaps you can find something more appropriate.
--
Steven
More information about the Tutor
mailing list