Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51977
| Date | 2013-08-05 22:01 +0200 |
|---|---|
| From | Rafael Durán Castañeda <rafadurancastaneda@gmail.com> |
| Subject | Re: [argparse] mutually exclusive group with 2 sets of options |
| References | <51fdb81b$0$2423$426a74cc@news.free.fr> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.217.1375732889.1251.python-list@python.org> (permalink) |
El 04/08/13 04:10, Francois Lafont escribió: > Hi, > > Is it possible with argparse to have this syntax for a script? > > my-script (-a -b VALUE-B | -c -d VALUE-D) > > I would like to do this with the argparse module. > > Thanks in advance. > > I think you are looking for exclusive groups: http://docs.python.org/2.7/library/argparse.html#argparse.add_mutually_exclusive_group HTH
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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