[Twisted-Python] Telnet Client as Line Receiver?

Mark Evans v6kk1hg02 at sneakemail.com
Mon Oct 27 12:41:10 EST 2003

I need advice on telnet.  What is the current recommended best
practice for writing a telnet client?

According to the documentation on Class LineReceiver, it is
"A protocol that receives lines and/or raw data, depending on mode."

This statement pretty much covers telnet, which is basically
line-oriented terminal stuff (actually older than the internet itself).
Yet the current 1.1.0 telnet code seems weirdly scattered across TM:

* There is no class relationship to LineReceiver.
* There exists a telnet server class ("Shell") but no symmetric
  telnet client class exists anywhere.  Other TM protocols offer both.
* Some of the telnet code is stuck in the (deprecated?) manhole modules.

For testing only I got the Shell subclass working, but my real need is
a telnet client that can talk to embedded devices over Ethernet.

Advice? Should I multiply inherit from LineReceiver and Telnet?
Should I subclass Shell and pervert its server functionality into
client functionality?

Since I have to do this work anyway, I would be willing to help with
any necessary changes to the Twisted library.  Tell me what needs doing,
and I will do it, to the extent that it overlaps with my work requirements.
The telnet code looks like it's in transition or maybe stale.

Telnet spec reference,

More information about the Twisted-Python mailing list