[Tutor] re:A thread gui chat problem

Daryl G gman_95@hotmail.com
Thu, 05 Jul 2001 00:55:43 -0000


I FIGURED IT OUT!!!!!!!!
I'm a moron and a genius all in one?!?..... I hate it when I post a 
question, then figure it out.
I suddenly (5 minutes ago) decided to see what would happen f I put the data 
socket receive line inside a try statement in the thread run method
And it WORKED!!

Yippie!!!!
I just don't know why that worked. Could  anyone explain if possible please?
Any additional suggestions are helpful too. Thanks!
Also, to get a window to pop back up on top of other windows, would I use 
deiconify?

New code in run method

class msgThread(threading.Thread):
    def __init__(self):



        threading.Thread.__init__(self)

    def run(self):

        while 1:
            #put socket receive statement  in try loop. Works now!!
            try:
                  data=app.tcpCliSock.recv(1024)
            except:
                  pass
            app.recdata.set(data)
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com