displaying extended ASCII from a telnet session

Christian Wilcox cwilcox at etcconnect.com
Fri Jan 9 12:04:27 EST 2004


I'm trying to programmatically access information from a telnet session which is normally accessed with a telnet program capable of terminal emulation (currently set at VT320).  The initial login text displays fine, of course, but when I get to the section which displays extended ASCII characters, Telnet from telnetlib displays the following garbled mess:

?[?40h?[?3l?[0;1m?>?[?1l?[?25l?[?3l?[0;0H?[2J?[?25l?(B??[0;7m?[23B ba6.0 version 03-1993/R1 ?[0m?[0;
7m?[1;2Hmtccom00000000?[1C               ?[1C               ?[1C               ?[1C               ?[
0m?[10;5H?(0?lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk?[11;5Hx?[68Cx?[1
2;5Hx?(B?  License Code :   178241/105?[39C?(0?x?[13;5Hx?(B?  Developed for:?[52C?(0?x?[14;5Hx?(B?
Electronic Theatre Controls?[39C?(0?x?[15;5Hx?[68Cx?[16;5Hmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
x?(B??[60CChoice:s?[56C?(0?x?[1D?[1B(0?x?[1D?[1B                              ?[5C?(0?x?[1D?[1B

Any ideas of a way to decode this information?

Christian




More information about the Python-list mailing list