Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsreader4.netcologne.de!news.netcologne.de!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'smallest': 0.07; 'subject:adding': 0.07; 'subject:getting': 0.07; 'subject:help': 0.08; 'lawrence': 0.09; 'parsing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'arg': 0.16; 'args.': 0.16; 'clear.': 0.16; 'dict': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'scripts.': 0.16; 'subject: \n ': 0.16; 'subject:beginner': 0.16; 'subject:values': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'string,': 0.24; 'header:X-Complaints-To:1': 0.27; 'header :In-Reply-To:1': 0.27; 'chris': 0.29; 'easier': 0.31; 'run': 0.32; 'url:python': 0.33; 'subject:the': 0.34; 'subject:from': 0.34; 'but': 0.35; 'there': 0.35; 'christopher': 0.36; 'from:addr:live.com': 0.36; 'doing': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'manually': 0.60; 'subject:. ': 0.67; 'url:0': 0.67; 'believe': 0.68; 'saw': 0.77 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Christopher Welborn Subject: Re: adding values from a csv column and getting the mean. beginner help Date: Wed, 11 Dec 2013 18:49:16 -0600 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 68-113-89-245.dhcp.leds.al.charter.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1386809370 news.xs4all.nl 2868 [2001:888:2000:d::a6]:43076 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:61631 On 12/11/2013 01:41 PM, Mark Lawrence wrote: > On 11/12/2013 19:22, Chris Angelico wrote: > There is, https://pypi.python.org/pypi/docopt/0.6.1 :) > +1 for docopt. It makes everything very clear. Just type out your usage string, and then run docopt(usage_str) on it to get a dict of your args. When I saw the video at http://docopt.org my jaw dropped. I couldn't believe all of the arg parsing junk I had been writing for even the smallest scripts. The other arg parsing libs make it easier than manually doing it, but docopt is magic. -- - Christopher Welborn http://welbornprod.com