my code fragment:
Code:def receive(self): c=0 prev="" f= file(self.scr, "wb+") while 1==1: #r != "\n" and r != "\r": r = self.rep.read(1) if r=="\n": if prev == "\n": c=c+1 prev=r if c==8: c=0 break f.write(r) f.flush() d = App() d.run() thread.start_new_thread(d.receive(), ()) d.close()
the app runs fine initially, but the thread is executed only once, and when the thread is completed, the app crashes with " thread.start_new_thread(d.receive(), ()) - first argument must be callable"

Reply With Quote

