Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41801

Re: Required arguments in argparse: at least one of a group

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail
From Marco <m.b@gmail.com>
Newsgroups comp.lang.python
Subject Re: Required arguments in argparse: at least one of a group
Date Sun, 24 Mar 2013 21:02:12 +0100
Organization Aioe.org NNTP Server
Lines 16
Message-ID <kinm40$9gn$1@speranza.aioe.org> (permalink)
References <kikjpg$ch5$1@speranza.aioe.org> <mailman.3648.1364056081.2939.python-list@python.org>
NNTP-Posting-Host zS88QjlDuw1DPxeZkBo9hg.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.python:41801

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Required arguments in argparse: at least one of a group Marco <m.b@gmail.com> - 2013-03-23 17:04 +0100
  Re: Required arguments in argparse: at least one of a group Rob Day <robert.day@merton.oxon.org> - 2013-03-23 16:27 +0000
    Re: Required arguments in argparse: at least one of a group Marco <m.b@gmail.com> - 2013-03-24 21:02 +0100
  Re: Required arguments in argparse: at least one of a group rurpy@yahoo.com - 2013-03-24 14:41 -0700

csiph-web