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


Groups > comp.lang.python > #29406

Re: 'indent'ing Python in windows bat

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'argument': 0.04; 'elif': 0.04; 'interpreter': 0.04; 'subject:Python': 0.05; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'script,': 0.09; 'sep': 0.09; 'sys.exit(2)': 0.09; "wouldn't": 0.11; 'language': 0.14; 'invoking': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:windows': 0.16; 'substitute': 0.16; 'sys.exit(1)': 0.16; 'mon,': 0.16; 'processor': 0.17; 'shell': 0.18; '(on': 0.22; 'command': 0.24; 'recognized': 0.27; 'ibm': 0.27; 'header:X-Complaints-To:1': 0.28; 'run': 0.28; 'closer': 0.29; 'end,': 0.29; 'convert': 0.29; 'file': 0.32; 'instruction': 0.32; 'like:': 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'something': 0.35; 'received:org': 0.36; 'charset:us-ascii': 0.36; 'passed': 0.37; 'rather': 0.37; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'smith': 0.71; 'sole': 0.75; 'dennis': 0.91; 'received:108': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject Re: 'indent'ing Python in windows bat
Date Mon, 17 Sep 2012 23:28:42 -0400
Organization > Bestiaria Support Staff <
References <mailman.3021.1347928001.27097.python-list@python.org> <5057C990.8080809@invtools.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host adsl-108-79-219-94.dsl.klmzmi.sbcglobal.net
X-Newsreader Forte Agent 3.3/32.846
X-No-Archive YES
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.855.1347938926.27098.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347938926 news.xs4all.nl 6860 [2001:888:2000:d::a6]:36872
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29406

Show key headers only | View raw


On Mon, 17 Sep 2012 21:08:32 -0400, David Smith <davids@invtools.com>
declaimed the following in gmane.comp.python.general:

> 
> 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)
>
	If the sole purpose of the BAT file is to set return codes, I
wouldn't bother using Python... Python is /not/ a shell language
substitute (On an IBM or Amiga, (A)Rexx is a closer match for a shell
language replacement -- since any "statement" that is not recognized as
a Rexx instruction would be passed the "current" command processor
[shell]).
 
	Invoking the whole Python interpreter to run a "one-liner" argument
is highly inefficient, and in the end, rather futile.

	Either convert the entire BAT file into a single multi-line Python
script, or don't bother.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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


Thread

Re: 'indent'ing Python in windows bat Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-17 23:28 -0400

csiph-web