Re: 'indent'ing Python in windows bat
On Mon, 17 Sep 2012 21:08:32 -0400, David Smith <firstname.lastname@example.org>
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
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
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
|All times are GMT. The time now is 06:25 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.