* Ufuk Eskici <[email protected]> [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 > [email protected] 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 [email protected] _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
