HT telnet interact with auto login?

Klaus Reinhardt K.Rdt at TU-Berlin.DE
Sun Jun 16 15:07:37 EDT 2002


On 16 Jun 2002 21:55:15 +0200, Chris Liechti <cliechti at gmx.net> wrote:

>K.Rdt at TU-Berlin.DE (Klaus Reinhardt) wrote in 
>news:3d0cd198.17917980 at news.zrz.tu-berlin.de:
>> I want to combine:
>> 
>> 1.)
>> tn.interact()     # this is working but with manually ..
>> 2.)
>> tn.read_until("login: ")     # this seams to work
>>                                        # but without connection
>> tn.write(user + "\r\n")
>> if password:
>>     tn.read_until("Password: ")
>>     tn.write(password + "\r\n")
>
>i don't understand your question... but often a '\r\n' is required
>as end of line. maybe this helps :-)
>
>chris

The \r don't help. Well, I want to have a script, which establishes
automatically a telnet-connection, so I can there do some
console-processing. My feeling is wrong, that I can give
user and password to interact() .. perhaps there is another
function ..

	Thanks Klaus



More information about the Python-list mailing list