Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53375
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: argparse - specify order of argument parsing? |
| Date | 2013-08-31 14:17 -0400 |
| References | <slrnl248ua.4b8.!nospam!astrochelonian@hypnotoad.vtr.net> <kvtbnr$ucq$1@ger.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.421.1377973205.19984.python-list@python.org> (permalink) |
On 8/31/2013 2:13 PM, Terry Reedy wrote: > On 8/31/2013 1:11 PM, Eduardo Alvarez wrote: >> When using argparse, is there a way to specify in what order arguments >> get parsed? > > I expect argparse to forward iterate the sequence of arguments that it > receives. Aside from the environment variable solution, you could search sys.argv for 'config=filename' and remove it and process it *before* you invoke argparse. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
argparse - specify order of argument parsing? Eduardo Alvarez <!nospam!astrochelonian@gmail.com> - 2013-08-31 13:11 -0400 Re: argparse - specify order of argument parsing? Tim Chase <python.list@tim.thechases.com> - 2013-08-31 12:50 -0500 Re: argparse - specify order of argument parsing? Terry Reedy <tjreedy@udel.edu> - 2013-08-31 14:13 -0400 Re: argparse - specify order of argument parsing? Terry Reedy <tjreedy@udel.edu> - 2013-08-31 14:17 -0400 Re: argparse - specify order of argument parsing? Peter Otten <__peter__@web.de> - 2013-09-01 08:53 +0200
csiph-web