There's currently no way to specify something like this - argparse
doesn't know how to say that two groups of options are mutually
exclusive. So yeah, you'll have to do your check above.
> but in that case, how exactly can I raise an exception such that the
> error messaging looks the same as argparse's natural parsing errors?
I think you just want to call parser.error(message):
http://docs.python.org/dev/library/argparse.html#argparse.ArgumentParser.error
Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
--- The Hiphopopotamus