* Ufuk Eskici <ufukesk...@gmail.com> [2012-12-20 16:25]: > Hello, > > I run this command and opens putty: > > import os > import subprocess > command = '"c:\Program Files\Putty\putty.exe" -ssh > ufukeskici@10.10.10.10-pw test > subprocess.Popen(command) > > But then I want to input new commands to this Putty new window. How can I > do it?
Once you start putty, it is a separate application that python doesn't really know anything about. How many commands are you trying to send? If it's only one or two, you might be able to set up a putty profile with a couple auto-commands on connect, but that's not the same thing. If it's a long string of commands, you might be better to pscp a shell script to the target with one command, and then call that script with the putty profile. I would research automating putty first, then see if there are any options within python to accomplish the same things. -- David Rock da...@graniteweb.com _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor