[Twisted-Python] Echo Server woes

Britt Green seamonkeys at gmail.com
Wed Aug 4 11:11:23 MDT 2004

So I've been playing with the examples on the Twisted website, mostly
the Echo server. When it runs, it immediately echos back whatever
character one types in. So the output looks like so:  aakkee33ccbb::oo

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.

Thanks! :)


More information about the Twisted-Python mailing list