Britt Green wrote:
I wanted to rewrite it so that it would repeat things a line at a time, as opposed to a chracter at a time. After playing with the code and getting nowhere, someone on IRC helped me out by telling me I should use the LineReceiver class from twisted.protocols.basic. What has me stuck is trying to figure out how to use LineReceiver's dataReceived() method as opposed to the identically named one on the example page. I can't really figure out what class the example's dataReceived() method comes from.
LineReceiver inherits from Protocol. See : http://www.twistedmatrix.com/documents/current/api/twisted.internet.protocol... Both defines a method dataReceived(). You can also play around with LineReceiver's LineMode() and RawMode(). Try placing a print statement in your ||rawDataReceived| <http://www.twistedmatrix.com/documents/current/api/twisted.protocols.basic.LineReceiver.html#rawDataReceived>|() method (but remember to call superclass method LineReceiver.rawDataReceived() first) regards, Eugene =============================================== Reedflute Software Solutions Web -> www.reedflute.com ===============================================