On 11/08/2012 09:33 PM, T. Girowall wrote: > <snip> > ip: 192.168.xx.xx > port: 2332 > > Any help is appreciated, > Tim > import getpass import sys import telnetlib HOST = "localhost" user = > raw_input("Enter your remote account: ") password = getpass.getpass() tn = > telnetlib.Telnet(HOST) tn.read_until("login: ") tn.write(user + "\n") if > password: tn.read_until("Password: ") tn.write(password + "\n") > tn.write("ls\n") tn.write("exit\n") print tn.read_all() > >
This is a text mailing list; your html mail thoroughly mangles your code for the majority of readers. Is there a reason why you used 192.168.xx.xx with putty, but used localhost with your python code? -- DaveA _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor