[Tutor] wait command
Andrei Kulakov
ak@silmarill.org
Fri, 9 Aug 2002 20:07:49 -0400
On Fri, Aug 09, 2002 at 04:38:16PM -0400, Watt III, Glenn wrote:
> this is probobly a stupid question but is there a command to wait for a
> condition like
> when condition:
> action
> or something that would do the same thing but a diffrent manner i would
> appreciate any help thanks
if condition:
action
does that, but it won't wait - it'll either do it or skip if condition
is false. You can however do this:
while 1:
if condition:
action
break
time.sleep(1)
- Andrei
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
--
Cymbaline: intelligent learning mp3 player: python, linux, console.
get it at: http://silmarill.org/cymbaline.htm