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


Groups > comp.lang.python > #29406 > unrolled thread

Re: 'indent'ing Python in windows bat

Started byDennis Lee Bieber <wlfraed@ix.netcom.com>
First post2012-09-17 23:28 -0400
Last post2012-09-17 23:28 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#29406 — Re: 'indent'ing Python in windows bat

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2012-09-17 23:28 -0400
SubjectRe: 'indent'ing Python in windows bat
Message-ID<mailman.855.1347938926.27098.python-list@python.org>
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/

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web