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!
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to