Stéphane Ninin wrote: > Yes, I typed it *really* too fast, it would be more something like this: > > def sendall(self, data): > while data: > try: > n = self.request.send(data) > data = data[n:] > except socket.timeout, e: > if self.isTerminated(): > return
And from a previous post: (self.isTerminated just checks is some event has been set by another thread) Do you want to timeout on inactivity, or do you want to timeout if sendall() does not complete within a given time? -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list