[Tutor] Thread forever

2006-09-07 Thread János Juhász
Dear Kent, thanks your comment. >> > When this program leaves from the while loop, it doesn't terminate the >> > comreader thread. >>If you call self.setDaemon() here you will mark the thread as a daemon >>thread and it will not block the exit of the program. It works well. Yours sincerely,

Re: [Tutor] Thread forever ?

2006-09-07 Thread Kent Johnson
János Juhász wrote: > > Dear Tutors, > > ### > from threading import Thread > import sys > import time > > # This thread would read lines from a > # barcode scanner > class ComThread(Thread): > def __init__(self): > Thread.__init__(self) If you call s

[Tutor] Thread forever ?

2006-09-07 Thread János Juhász
Dear Tutors, ### from threading import Thread import sys import time # This thread would read lines from a # barcode scanner class ComThread(Thread):     def __init__(self):         Thread.__init__(self)             def run(self):         while 1:             ti