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 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: References: 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 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 --dir > finder.py --pattern --dir > finder.py --file --pattern --dir > """ Thanks Rob, but I was looking for a solution in the stdlib -- Marco