Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:How': 0.09; 'python': 0.09; '"if': 0.09; '__future__': 0.09; 'callable': 0.09; 'command-line': 0.09; 'subject:command': 0.09; 'subject:while': 0.09; 'subject:python': 0.11; 'braces?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'oct': 0.16; 'wrote:': 0.17; 'implementing': 0.17; 'import': 0.21; 'pass': 0.25; 'header :In-Reply-To:1': 0.25; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'subject:" ': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'subject: -': 0.84; '9:00': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MFyjMfq47hWN+hZVRyp6mYCwTCGQtm8nEvJxM+nlrKM=; b=feucb+mRN6Llm2JTIBa+HL+ZW++TSicmEkmS0mU6QwB6BB7CtTxvGdL14Ho8LvgpUz JKaEQ4Z+n6+21EQQV9KzxwrCyoB1zCY0p9QIipXK0a6scITqW+20/k/qMRpIrjK2+fe0 Z/R4Goglvoh2Ef3nQegRl/tTZMUp5txcKDPpwdqwwtQ9Sg7c7Fu4Ff1KnIl3rGPw3h1C BI4rMWhBSvBcLHhlDVS56MS7Z0f0uMG9p/fG9q72lfOg2U1jw2cOKDsN4VdWeiB7bxeW N+EXme7ZmJ2KSYUyy5NLoo/xmtwlLe5t3dZJsqlBmuM3NsrTSEVkLhi8pSWs1zeMKotv tsXw== MIME-Version: 1.0 In-Reply-To: References: <5078b6a9$0$6574$c3e8da3$5496439d@news.astraweb.com> <20121013084132.GA5083@taris.box> Date: Sun, 14 Oct 2012 09:09:24 +1100 Subject: Re: How to use "while" within the command in -c option of python? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350166167 news.xs4all.nl 6964 [2001:888:2000:d::a6]:34625 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31223 On Sun, Oct 14, 2012 at 9:00 AM, Joshua Landau wrote: > That is also callable from the command-line like so: >> >> python -m debrace -c "if a: ${ print(1) $ print(2) $ while b: c() $ if g: >> ${ pass }$ }$ print(d)" Wait.... you're pretty much implementing from __future__ import braces? ChrisA