Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51982

RE: [argparse] mutually exclusive group with 2 sets of options

From "Joseph L. Casale" <jcasale@activenetwerx.com>
Subject RE: [argparse] mutually exclusive group with 2 sets of options
Date 2013-08-05 22:15 +0000
References <51fdb81b$0$2423$426a74cc@news.free.fr> <52000492.5030502@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.219.1375741018.1251.python-list@python.org> (permalink)

Show all headers | View raw


> I think you are looking for exclusive groups:
> 
> http://docs.python.org/2.7/library/argparse.html#argparse.add_mutually_excl
> usive_group

No. That links first doc line in that method shows the very point we are all discussing:

"Create a mutually exclusive group. argparse will make sure that only one
of the arguments in the mutually exclusive group was present on the
command line:"

Op requires more than one per group, this method "make sure that only one
of the arguments" is accepted.

jlc

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[argparse] mutually exclusive group with 2 sets of options Francois Lafont <francois.lafont@nospam.invalid> - 2013-08-04 04:10 +0200
  Re: [argparse] mutually exclusive group with 2 sets of options Francois Lafont <francois.lafont@nospam.invalid> - 2013-08-05 04:05 +0200
    Re: [argparse] mutually exclusive group with 2 sets of options Joshua Landau <joshua@landau.ws> - 2013-08-05 04:53 +0100
  Re: [argparse] mutually exclusive group with 2 sets of options Miki Tebeka <miki.tebeka@gmail.com> - 2013-08-05 07:11 -0700
    RE: [argparse] mutually exclusive group with 2 sets of options "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-08-05 17:11 +0000
    Re: [argparse] mutually exclusive group with 2 sets of options Francois Lafont <francois.lafont@nospam.invalid> - 2013-08-06 00:13 +0200
  Re: [argparse] mutually exclusive group with 2 sets of options Rafael Durán Castañeda <rafadurancastaneda@gmail.com> - 2013-08-05 22:01 +0200
    Re: [argparse] mutually exclusive group with 2 sets of options Francois Lafont <francois.lafont@nospam.invalid> - 2013-08-06 00:34 +0200
      Re: [argparse] mutually exclusive group with 2 sets of options Francois Lafont <francois.lafont@nospam.invalid> - 2013-08-07 01:18 +0200
        Re: [argparse] mutually exclusive group with 2 sets of options Francois Lafont <francois.lafont@nospam.invalid> - 2013-08-07 01:36 +0200
  RE: [argparse] mutually exclusive group with 2 sets of options "Joseph L. Casale" <jcasale@activenetwerx.com> - 2013-08-05 22:15 +0000

csiph-web