Re: [Tutor] how to control putty window

2012-12-27 Thread Alan Gauld
On 27/12/12 10:32, Dave Angel wrote: Another comment: when starting a new thread, please use a fresh email to tutor@python.org. Don't use reply to an existing message, or your query can get lost in the noise. And of course pick a subject line that matches your query, like "Trouble importing

Re: [Tutor] how to control putty window

2012-12-27 Thread ALAN GAULD
/ > > From: Ufuk Eskici >To: Alan Gauld >Cc: "tutor@python.org" >Sent: Thursday, 27 December 2012, 9:53 >Subject: Re: [Tutor] how to control putty window > > >It seems it is looking for Paramiko under wrong folder. > > >>&g

Re: [Tutor] how to control putty window

2012-12-27 Thread Dave Angel
On 12/27/2012 04:53 AM, Ufuk Eskici wrote: > It seems it is looking for Paramiko under wrong folder. > import paramiko > Traceback (most recent call last): > File "", line 1, in > import paramiko > File "C:/Users/eufuesk/Desktop\paramiko.py", line 3, in > ssh = paramiko.SSHClient

Re: [Tutor] how to control putty window

2012-12-27 Thread Hugo Arts
On Thu, Dec 27, 2012 at 10:53 AM, Ufuk Eskici wrote: > It seems it is looking for Paramiko under wrong folder. > > >>> import paramiko > > Traceback (most recent call last): > File "", line 1, in > import paramiko > File "C:/Users/eufuesk/Desktop\paramiko.py", line 3, in > ssh = par

Re: [Tutor] how to control putty window

2012-12-27 Thread Ufuk Eskici
It seems it is looking for Paramiko under wrong folder. >>> import paramiko Traceback (most recent call last): File "", line 1, in import paramiko File "C:/Users/eufuesk/Desktop\paramiko.py", line 3, in ssh = paramiko.SSHClient() AttributeError: 'module' object has no attribute 'SSH

Re: [Tutor] how to control putty window

2012-12-27 Thread Alan Gauld
On 27/12/12 09:36, Ufuk Eskici wrote: I've installed Paramiko on my PC with Python 2.7. My code is: import paramiko import os ssh = paramiko.SSHClient() ssh.connect('10.10.10.10', username='ufuk', password='ufuk') Traceback (most recent call last): File "C:/Users/eufuesk/Desktop/paramiko.py

Re: [Tutor] how to control putty window

2012-12-27 Thread Ufuk Eskici
Hello, I've installed Paramiko on my PC with Python 2.7. My code is: import paramiko import os ssh = paramiko.SSHClient() ssh.connect('10.10.10.10', username='ufuk', password='ufuk') But I'm getting this error: >>> Traceback (most recent call last): File "C:/Users/eufuesk/Desktop/paramiko.py

Re: [Tutor] how to control putty window

2012-12-21 Thread eryksun
On Fri, Dec 21, 2012 at 9:44 AM, Ufuk Eskici wrote: > > cmd = "plink -ssh -l ufuk10.10.10.10 -pw password" > process = subprocess.Popen(cmd) > inputdata="r van" > result = process.communicate(inputdata) > > But after the successful SSH, I cannot continue, no command runs: To use communicate(), y

Re: [Tutor] how to control putty window

2012-12-21 Thread Ufuk Eskici
I used this code: os.chdir("c:\\Program Files\\Putty") cmd = "plink -ssh -l ufuk 10.10.10.10 -pw password" process = subprocess.Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=subprocess.PIPE) stdout, stderr = process.communicate () After running this code, just one black cmd screen appears, but it fr

Re: [Tutor] how to control putty window

2012-12-21 Thread Prasad, Ramit
Ufuk Eskici wrote: > Hello, > > I changed my way. This time I'm using "plink" under Putty. > > My python code is: > > os.chdir("c:\\Program Files\\Putty") > cmd = "plink -ssh -l ufuk10.10.10.10 -pw password" > process = subprocess.Popen(cmd) > inputdata="r van" > result = process.communicate(in

Re: [Tutor] how to control putty window

2012-12-21 Thread Ufuk Eskici
Hello, I changed my way. This time I'm using "plink" under Putty. My python code is: os.chdir("c:\\Program Files\\Putty") cmd = "plink -ssh -l ufuk10.10.10.10 -pw password" process = subprocess.Popen(cmd) inputdata="r van" result = process.communicate(inputdata) But after the successful SSH, I

Re: [Tutor] how to control putty window

2012-12-20 Thread Prasad, Ramit
Ufuk Eskici wrote: > 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

Re: [Tutor] how to control putty window

2012-12-20 Thread Alan Gauld
On 20/12/12 14:25, Ufuk Eskici wrote: 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 thi

Re: [Tutor] how to control putty window

2012-12-20 Thread Dave Angel
On 12/20/2012 09:25 AM, Ufuk Eskici wrote: > > 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) > > You really should use cut and paste when trying to tell us what

Re: [Tutor] how to control putty window

2012-12-20 Thread David Rock
* Ufuk Eskici [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 wind

[Tutor] how to control putty window

2012-12-20 Thread Ufuk Eskici
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? Thanks. Ufuk __