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


Groups > comp.lang.python > #29404

Re: 'indent'ing Python in windows bat

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'elif': 0.04; 'subject:Python': 0.05; 'sep': 0.09; 'sys.exit(2)': 0.09; 'received:74.125.82.44': 0.15; 'subject:windows': 0.16; 'sys.exit(1)': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'trying': 0.21; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'received:74.125.82': 0.33; 'like:': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'something': 0.35; 'really': 0.36; 'received:74.125': 0.36; 'why': 0.37; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'smith': 0.71; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CxAzTQPMejlPQMCUqQaj5M+xlDGAev1Y0Hv7mWePoQ8=; b=m9rZRBGV6GKzSzXGQU7IdGuQOTqh8ZebLE/NMOvNWkdcH1GyfelmQSedco3zdEZrpz uRxUnLfLDJZ6BSyVt8rl4thx0T7Y5ecD3sDXZTgsCyrh+e7OsyiVxw9pwWNpvyGeQpIA sJnAbetZlQ2tidvLyV507IGOfNSp5D6syUpAFIPIsBIAcoFgjnp2Kao9UTL9/yJ2Y7Z9 tf3K60p9mVcDLX88Te0uqg0Ue2G4z4iurdIl079pJOpGsOzqPiaTlgsk7wkp1OGQXyKQ DOGkkXi07+DRS1OnnmS3MxA7gOIEsLIFRBV8rU1w0vrLpUpC1ZauAMdFUlrHlAqePEOc CGuw==
MIME-Version 1.0
In-Reply-To <5057C990.8080809@invtools.com>
References <mailman.3021.1347928001.27097.python-list@python.org> <5057C990.8080809@invtools.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Mon, 17 Sep 2012 21:01:14 -0600
Subject Re: 'indent'ing Python in windows bat
To Python <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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.854.1347937306.27098.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347937306 news.xs4all.nl 6927 [2001:888:2000:d::a6]:57427
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29404

Show key headers only | View raw


On Mon, Sep 17, 2012 at 7:08 PM, David Smith <davids@invtools.com> wrote:
> How do I "indent" if I have something like:
> if (sR=='Cope'): sys.exit(1) elif (sR=='Perform') sys.exit(2) else
> sys.exit(3)

How about:

if sR == 'Cope':
    sys.exit(1)
elif sR == 'Perform':
    sys.exit(2)
else:
    sys.exit(3)

I don't really understand why you're trying to keep it all on one line.

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


Thread

Re: 'indent'ing Python in windows bat Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-17 21:01 -0600
  Re: 'indent'ing Python in windows bat Roy Smith <roy@panix.com> - 2012-09-17 23:17 -0400
  Re: 'indent'ing Python in windows bat Hans Mulder <hansmu@xs4all.nl> - 2012-09-19 09:53 +0200

csiph-web