Velocity Reviews

Velocity Reviews (
-   Python (
-   -   Re: 'indent'ing Python in windows bat (

Terry Reedy 09-18-2012 05:08 AM

Re: 'indent'ing Python in windows bat
On 9/17/2012 9:08 PM, David Smith wrote:
> Hello, I'm essentially a newbie in Python.
> My problem in searching the archives is not knowing what words to use to
> ask.
> I'm converting windows bat files little by little to Python 3 as I find
> time and learn Python.
> The most efficient method for some lines is to call Python like:
> python -c "import sys; sys.exit(3)"
> 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)

Quite aside from whether this is good idea, I believe putting \n
followed by spaces or \t in the quoted string should work. It does for exec.

Terry Jan Reedy

All times are GMT. The time now is 04:48 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.