[Tutor] wait command
D. Rick Anderson
ruger@comnett.net
Fri, 09 Aug 2002 16:19:43 -0700
You can always:
while 1:
if actionvar == 'blatherskite':
function()
actionvar = 'notblatherskite'
That would sit and cycle until actionvar was equal to 'blatherskite' and
then run function. It would probably be more useful if it were also
calling another function that may be checking something and changing the
state of actionvar.
I'm sure there's more elegant ways of doing this, but I'm not a Jedi yet. :)
HTH
Rick
Kyle Babich wrote:
>On Fri, 9 Aug 2002 16:38:16 -0400, "Watt III, Glenn"
><gwatt3@backbonesecurity.com> said:
>
>
>>this is probobly a stupid question but is there a command to wait for a
>>condition like
>>when condition:
>> action
>>
>>
>
>You probably mean if/elsif/else:
>
>if name == "billy":
> print "Hi Billy"
>elsif name == "bob":
> print "Hi Bob"
>elsif name == "joe":
> print "Hi Joe"
>else:
> print "Hi BillyBobJoe"
>
>
>
>>or something that would do the same thing but a diffrent manner i would
>>appreciate any help thanks
>>
>>_______________________________________________
>>Tutor maillist - Tutor@python.org
>>http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>
>--
>Kyle
>
>_______________________________________________
>Tutor maillist - Tutor@python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
>