[Tutor] real time response
Michael C
mysecretrobotfactory at gmail.com
Tue May 23 16:07:50 EDT 2017
hi all:
I have a code that takes about 20 seconds to complete, but I also need to
response
to events (the appearance of red dots on a canvas) so I could place a few
lines to
check for this condition like this
def do_stuff:
blah
blah
check()
blah
blah
blah
check()
blah
blah
blah
check()
blah
and then either break or return if condition is met?
But that just isn't responsive enough. Is there a way to make function
check for the event every 0.5 seconds without interfering with the
do_stuff, ie a code that has its' own space? then something interrupts and
closes down do_stuff and run
another function in response?
thanks!
More information about the Tutor
mailing list