[Tutor] Telnetlib

lumbricus@gmx.net lumbricus@gmx.net
Sun, 4 Aug 2002 15:08:50 +0200 (MEST)


> Hello all,

Hello!
 
> I am new to the list and already enjoying it very
> much. I have a couple a questions about Telnetlib and
> hope somebody can help me with them. I am currently
> writing a Telnet script to automate some data entry.
> Given a telnet object tn, the way to send some text to
> the remote server is of course 'tn.write(text)'. But
> how do I send function keys such as F4, F7 which
> perform some specific tasks in the application I am
> working with? Terminal type is VT-200.

AFAIK These function keys are translated to sequenzes of
characters by your (virtual) terminal. You should
be able to send these as raw strings through a telnet 
connection. 
'man termcap' might also help.

> Also, when you set the telnet debug level, all debug
> messages go by default to sys.stdout. Is there a way

I don't know for sure, but I would expect them to be
sent to sys.stderr. 

> to redirect to a file? I can't find this in the
> documentation. Perl's Telnet module allows to do this

os.popen

> but I am trying to get away from Perl.
> Thanks in advance
> Levy Lazarre
> llazarre@yahoo.com

HTH, HAND
J"o!

-- 
 

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net