[Tutor] Repeat function until...

Alan Gauld alan.gauld at btinternet.com
Wed Jun 23 20:09:38 CEST 2010


"Steven D'Aprano" <steve at pearwood.info> wrote 

> The easiest way is to just run forever, and stop when the user 
> interrupts it with ctrl-D (or ctrl-Z on Windows):

I think that would be Ctrl-C on both.
Ctrl-D/Z is EOF not Interrupt. Certainly on Windows Ctrl-Z won't 
interrupt a loop.

But the principle is good and definitely the easiest option.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list