telnetlib
Peter Yu
roger_callisto at hotmail.com
Mon Jul 31 14:23:48 EDT 2000
In article <20000731091354.A1319 at reepicheep.avalongroup.net>,
Timothy Grant <tjg at exceptionalminds.com> wrote:
> This causes me to have a question. As I have been working through
> this problem I used a debug level of 255 and interact() to see what
was
> going on. Using interact, the Enter key on my computer sends a \012.
Using
> \n sends the same thing. interact() would die in the same spot as my
script
> did, so is there something weird going on with this particular
terminal?
One thing I found out while working with various telnet clients to test
out the behaviors in order to make a telnet-aware server:
In line-by-line mode, the enter key is usually \n or \r\n
In character-by-character mode, the enter key is \r\0
Of course, the entry modes aren't necessarily the best indicators: For
example, the telnet client that comes with Windows 95/98 stays in
character-by-character mode, but the enter key is sent as \r\n.
Also, some programs I've seen also check for the presence of \n\r for
the line terminator, so I suspect some platforms out there does sends
that, as well.
Hope this is helpful,
Peter Yu
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list