[Tutor] Groups of mutually exclusive options
rail shafigulin
rail.shafigulin at gmail.com
Tue Apr 22 02:26:41 CEST 2014
>
>
>>
> Sorry, I didn't follow your example. Can you explain what you mean in
> English? What would be the outcome if you succeeded?
> What could the user do and not do?
The idea is to use two groups of parameters. The user can use only one
group of parameters.
For example say I have a the script with called myscript.py which can take
two groups of options
group1
option1a
option1b
option1c
group2
option2a
option2b
otpion2c
I can run this script only with the following options
myscript.py --option1a --option1b --option1c
or
myscript.py --option2a --option2b --option2c
I cannot run run a script with the following options
myscript --option1a --option2a
So it is similar to having mutually exclusive options, however this is sort
of on a larger scale. Instead of having mutually exclusive options, we
would have mutually exclusive sets of options.
Let me know if it didn't clarify the details. I will try to come up with a
better explanation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140421/541ef9b7/attachment.html>
More information about the Tutor
mailing list