[Tutor] Halting execution
Ertl, John
john.ertl at fnmoc.navy.mil
Wed May 3 19:09:31 CEST 2006
Matthew,
Not sure if ipython is different but have you tried sys.exit("stoping now")
You could also put in a flag to turn the printing on and off so it wont
print it out when you are testing.
John
-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On
Behalf Of Matthew Webber
Sent: Wednesday, May 03, 2006 9:35 AM
To: tutor at python.org
Subject: [Tutor] Halting execution
This has got to be trivial, but I can't find the answer ... I want to stop
execution of my main script half way through. This is just for debugging -
the code in the bottom half of the script generates a whole lot of output
that I don't want. Inserting "break" or "return" doesn't work, but something
like that is what I had in mind.
I'm running under ipython on windows, FWIW.
Thanks
_______________________________________________
Tutor maillist - Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list