Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2 options both mutually exclusive with respect to 3rd option

7 views
Skip to first unread message

Loris Bennett

unread,
Aug 3, 2022, 9:18:42 AM8/3/22
to
Hi,

I want to plot some data which are collected over time. I either want
to specify start and/or end times for the plot, or specify last week, month
or year. So the usage would look like:

plot_data [[--start START --end END] | --last LAST ]

I know about argsparse's mutually exclusive group, but this creates a
group of option with are all mutually exclusive amoungst each other. I
want both --start and --end to be mutually exclusive with respect to
--last.

Can I achieve this directly with argsparse, or do I just have to check
the options by hand?

Cheers,

Loris

--
This signature is currently under construction.
0 new messages