Could an effective telnet be written?

Eric Lee Green eric at estinc.com
Wed Sep 13 12:18:43 EDT 2000


pehr anderson wrote:
> If you are willing to implement all the logic of the
> emulated terminal, then you can certainly be satisfied
> with the Tkinter text widget.

Actually, in today's world I'd recommend going with wxPython rather than
Tkinter. wxPython runs quite a bit faster and has much better functionality. 
The downside is that it's rather hard to build (requires the wxWindows library
which in turn requires the gtk+ library which in turn requires the gdk
library, unless you're under Windows in which case it just requires MFC ... ).

One problem you will run into is network communications. I wrote a  'rsh'-like
client in Python, and it simply would not run fast enough. The problem seemed
to be in the string allocation/deallocation done by the read() method to
filehandles. I used 'select' of course, but I was getting as little as
500k/sec thruput (which is NOT acceptable on a 100BaseT network for a client
whose purpose in life was transferring large archives from one machine to
another). I ended up having to write a 'talkmodule' in "C" that handled the
guts of 'rsh' (i.e., reading bytes into fixed-size buffers, then shipping them
to stdout or stderr or the inout socket...). This was very disappointing.
However, the 500k/sec thruput would probably be more than adequate for a
telnet-5250 emulator. 


> > Could someone comment on the feasibility of writing a telnet-5250
> > emulator using '100% pure python' :) ?

Yes, it's feasible. Not easy tho.

-- 
Eric Lee Green                         eric at estinc.com
Software Engineer                      "The BRU Guys"
Enhanced Software Technologies, Inc.   http://www.estinc.com/
(602) 470-1115 voice                   (602) 470-1116 fax



More information about the Python-list mailing list