Re: [Tutor] Obtaining result from a sendline

2012-10-31 Thread Prasad, Ramit
Dave Wilder wrote: > Okay, file this under RTFM, but even after research, I cannot figure out the > answer to this simple question. > > When I do an ssh in python (version 2.7.3) to a device, I am trying to > capture the output of the command. > However, all I get back is a numerical value.  I a

Re: [Tutor] Obtaining result from a sendline

2012-10-31 Thread Dave Angel
On 10/31/2012 09:28 AM, Dave Wilder wrote: > Sorry for the poor info on my part Steven et al. I did not do my homework. > > > > I thought that sshclient was an imported module, however it is pxssh that I > am importing as sshClient. > > import pxssh as sshClient > > Please don't top-post. You

Re: [Tutor] Obtaining result from a sendline

2012-10-31 Thread Dave Wilder
just renamed it when I emailed my question, which was probably not a good idea. Thanks, Dave -Original Message- From: eryksun [mailto:eryk...@gmail.com] Sent: Wednesday, October 31, 2012 1:44 AM To: Dave Wilder Cc: tutor@python.org Subject: Re: [Tutor] Obtaining result from a

Re: [Tutor] Obtaining result from a sendline

2012-10-31 Thread Steven D'Aprano
On 31/10/12 12:47, Dave Wilder wrote: When I do an ssh in python (version 2.7.3) to a device, I am trying to capture the output of the command. However, all I get back is a numerical value. I am looking to get the actual output from the "ls /var/tmp" command below. This is probably readily av

Re: [Tutor] Obtaining result from a sendline

2012-10-30 Thread eryksun
On Tue, Oct 30, 2012 at 9:47 PM, Dave Wilder wrote: > > However, all I get back is a numerical value. I am looking to get the > actual output from the “ls /var/tmp” That would be the number of bytes sent. > ssh = sshClient.pxssh() > ssh.login(server=ip_addr, username=user, password=pswd) > str

[Tutor] Obtaining result from a sendline

2012-10-30 Thread Dave Wilder
Okay, file this under RTFM, but even after research, I cannot figure out the answer to this simple question. When I do an ssh in python (version 2.7.3) to a device, I am trying to capture the output of the command. However, all I get back is a numerical value. I am looking to get the actual