Re: Repeating Thread Error

2007-07-06 Thread Steve Holden
Jonathan Shan wrote: Hello, I am trying to call a function every 5 seconds. My understanding of time.sleep() is during the sleep time everything "stops". However, in my application, there are background processes that must be running continuously during the five second interval. Thus, threading.

Re: Repeating Thread Error

2007-07-06 Thread jimxu
hmm.. why use while True? After 5 secs, the function is going to run. so t = threading.Thread(5.0, func) t.start() should just work. Put it in a infinite loop will start the thread and then start a the stopped thread... forever. Jim On Jul 6, 2007, at 2:40 PM, Jonathan Shan wrote: > Hello,

Re: Repeating Thread Error

2007-07-06 Thread Marc 'BlackJack' Rintsch
On Fri, 06 Jul 2007 14:40:16 -0700, Jonathan Shan wrote: > I am trying to call a function every 5 seconds. My understanding of > time.sleep() is during the sleep time everything "stops". Not "everything", just the thread in which `sleep()` is called. > However, in my application, there are backg

Repeating Thread Error

2007-07-06 Thread Jonathan Shan
Hello, I am trying to call a function every 5 seconds. My understanding of time.sleep() is during the sleep time everything "stops". However, in my application, there are background processes that must be running continuously during the five second interval. Thus, threading.Timer seems like a good

Re: Thread error

2006-12-05 Thread Salvatore Di Fazio
Dennis Lee Bieber ha scritto: > Ah, sorry... Warned you that I didn't test... > > Duplicate the block of lines with the .join() calls. Put this block > just before them, but after the threading.Thread calls, and change the > .join() to .start() Tnx Dennis I resolved yesterday after th

Re: Thread error

2006-12-04 Thread Salvatore Di Fazio
Hi Dennis, I have another little problem with your source: Traceback (most recent call last): File "main.py", line 86, in kdi.join() # wait for kdi thread to exit NO CPU HOG BUSY LOOPS File "d:\programmi\python25\lib\threading.py", line 549, in join assert self.__started, "cannot joi

Re: Thread error

2006-12-04 Thread Salvatore Di Fazio
Tnx Dennis, this is my first python program, so I don't know every modules :( Anyway thank you so much for the suggestions, corrections and for the whole program :) Thank you -- http://mail.python.org/mailman/listinfo/python-list

Thread error

2006-12-03 Thread Salvatore Di Fazio
Hi guys, when I close the application I get the following error: - Traceback (most recent call last): File "main.py", line 88, in while exit : pass KeyboardInterrupt Unhandled exception in thread started by Error in sys.excepthook: Original exception was: --