On 7/12/10 11:43 AM, Jean Daniel wrote: > Hello, > > I wrote a small client protocol which connects to a notification > server. The client role is to connect, and then to print the > notification which comes from the server until the server says "stop"
<snip> > > Does someone knows how to make the for loop work with data coming from > network requests? > Maybe you've got bigger things in mind, but I don't know what all of that buys you, at least from your example use case (client connects, prints response from server, quits on 'stop'). What's wrong with keeping it simple and handling responses in the Protocol? def lineReceived(self, line): if line == 'stop': reactor.stop() else: print(line) _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python