unable to create "subgroups" under mutually exclusive group

2,014 views
Skip to first unread message

Liang Wang

unread,
Mar 9, 2011, 9:24:31 PM3/9/11
to argparse-users
Dear developer,

I am new to Python and have a question: is there any way in argparse
to create "subgroups" under mutually exclusive group? For example, I
would like to group four options a, b, c, and d into two mutually
exclusive subgroups ("a","b") and ("c","d"). And within each group, I
hope both of the arguments are "required", for example, if "--b"
presents, then "--a" should presents.

Seems to be the issue raise here:

http://stackoverflow.com/questions/4770576/does-argparse-python-support-mutually-exclusive-groups-of-arguments


Regards,
Liang

Steven Bethard

unread,
Mar 26, 2011, 11:00:26 AM3/26/11
to argpars...@googlegroups.com

There is now a feature request for something like this:

http://bugs.python.org/issue11588

But it probably won't make much progress until someone writes a patch. ;-)

Steve
--
Where did you get that preposterous hypothesis?
Did Steve tell you that?
        --- The Hiphopopotamus

Reply all
Reply to author
Forward
0 new messages