Éric Araujo mer...@netwok.org added the comment:
I wouldn’t use the syntax used by find, dd or other very old and peculiar
commands as an example for anything new :)
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
Georg Brandl ge...@python.org added the comment:
What alternate syntax would you suggest for a find type command then (other
than replacing -long by --long)?
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
New submission from wrobell wrob...@pld-linux.org:
it would be great if argparse allowed to specify options for multiple
positional arguments, i.e.
usage: ascript [-h] [-k value] input [[-k value] input ...] output
then
$ ascript pos1 pos2 -k 1 pos3 -k 2 pos4 pos5 pos6 out
would give
R. David Murray rdmur...@bitdance.com added the comment:
It took me a while to make any sense out of your example, but having done so I
don't think it makes any sense in the argparse context. It is certainly not the
way argparse handles options or arguments. In argparse, if you have an option
wrobell wrob...@pld-linux.org added the comment:
an example would be a pdf merger accepting multiple files and allowing to
specify list of pages for each input.
at the moment, you can do the following with argparse
pdfmerge [pages] input [[pages] input ...] output
of course, above is not
R. David Murray rdmur...@bitdance.com added the comment:
Well, if you can figure out how to add it, please do suggest a patch :)
It occurs to me that 'find' is a sort-of similar example, where options can be
repeated but the order in which they appear relative to other options matters.
So I