[FRPythoneers] Exiting the main code block

J. Wayde Allen wallen at lug.boulder.co.us
Fri Jun 1 13:12:29 MDT 2001


Yesterday I was tinkering with a new program and had been thinking that
I'd like to simply terminate the program if certain conditions occur.  I
tried using a break statement, but that causes an error since I was
not in a loop.  I suppose I could do something like:

   while 1:
      if condition == something: break
      otherwise do stuff

Is there a better way to cause the main program block to terminate?

- Wayde
  (wallen at lug.boulder.co.us)




More information about the FRPythoneers mailing list