Re: Regarding Telnet library in python

2008-08-13 Thread Eddie Corns
Hishaam <[EMAIL PROTECTED]> writes: >Hi, >In python documentation, i found a telnet example as follows: >- >import getpass >import sys >import telnetlib >HOST = "localhost" >user = raw_input("Enter your remote account: ") >

Re: Regarding Telnet library in python

2008-08-13 Thread Simon Mullis
Hi there, This works (but bear in mind I'm about only 30 minutes into my Python adventure...): -- def connect(host): tn = telnetlib.Telnet(host) return tn def login(session,user,password): session.write("\n") session.read_until("Login: ") sessi