Hi all,

Trying to implement a watchdog thread in a Carbon Event-based  
application. Trouble is, the thread's sleep() call never seems to  
return. (10.4.9/PPC/Python 2.5) Demonstration code below:

#!/usr/local/bin/python

from threading import Thread
from time import sleep
from Carbon.CarbonEvt import *

def stop():
        print 'sleep'
        sleep(2)
        print 'wake' # never executes
        QuitApplicationEventLoop()

print 'start thread'
t = Thread(target=stop)
t.start()

print 'start event loop'
RunApplicationEventLoop()


Any ideas?

Thanks,

has
-- 
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
http://appscript.sourceforge.net/objc-appscript.html

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to