Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > 'indent'ing Python in windows bat

Reply
Thread Tools

'indent'ing Python in windows bat

 
 
David Smith
Guest
Posts: n/a
 
      09-18-2012
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)

My sole result in many attempts is "Syntax Error."

Thank you for any help.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: 'indent'ing Python in windows bat Ian Kelly Python 2 09-19-2012 07:53 AM
Re: 'indent'ing Python in windows bat Dave Angel Python 0 09-18-2012 05:16 AM
Re: 'indent'ing Python in windows bat Terry Reedy Python 0 09-18-2012 05:08 AM
Re: 'indent'ing Python in windows bat Dennis Lee Bieber Python 0 09-18-2012 03:28 AM
Re: 'indent'ing Python in windows bat Dave Angel Python 0 09-18-2012 01:22 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57