[Pythonmac-SIG] (no subject)
tom smith
tom@othermedia.com
Wed, 06 Dec 2000 09:41:41 +0000
on 5/12/00 9:17 pm, Christian Reyes at christian@rocketnetwork.com wrote:
> Ok, real quick one.
> How do I get python to yield to other processes on the mac?
haha! I've just been playing with this...
My *solutions* were...
Have a look at the "framework" stuff in the mac folder. With this you can
handle you're code on an idle event...so, everytime you get an idle message,
you do a bit more of your stuff. This results is an "always-on" application
that doesn't hog the processor...
My other *solution* was to use Tk, which has an event loop, and the
setafter() call, with which you can set how you get called back...
I could get the SchedParams() thing to let go of the processor or
time.sleep()...and threading...apart from being complicated...seems to crash
a fair bit...with me at least.
The two examples above at least work, although they're not exactly what you
want
hope this helps
tom