argparse - specify order of argument parsing?
Terry Reedy
tjreedy at udel.edu
Sat Aug 31 14:17:33 EDT 2013
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
More information about the Python-list
mailing list