Required arguments in argparse: at least one of a group
Marco
m.b at gmail.com
Sun Mar 24 16:02:12 EDT 2013
On 03/23/2013 05:27 PM, Rob Day wrote:
> I don't know about argparse, but if you use docopt
> (http://docopt.org/) then this is easy to do with something like:
>
> """Usage:
>
> finder.py --file <myfile> --dir <mydir>
> finder.py --pattern <mypattern> --dir <mydir>
> finder.py --file <myfile> --pattern <mypattern> --dir <mydir>
> """
Thanks Rob, but I was looking for a solution in the stdlib
--
Marco
More information about the Python-list
mailing list