First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered Apr 8 '5

jconto gravatar image

You can put the code within a "1-loop" for loop and break out of it at different 'stages' (effectively jumping to the end):

long code

for i in range(1):

click to hide/show revision 2
No.2 Revision

You can put the code within a "1-loop" for loop for-loop and break out of it at different 'stages' (effectively jumping to the end):end and not using quit() or sys.exit()):

# long code

code for i in range(1):

range(1): do something if error1: break do also... if error2: break ... and so on # end of long code