'indent'ing Python in windows bat

D

David Smith

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top