Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient()

Chris Angelico rosuav at gmail.com
Sun Aug 11 04:57:14 EDT 2013


On Thu, Aug 8, 2013 at 8:20 AM, sagar varule <sagar.varule at gmail.com> wrote:
>  stdin, stdout, stderr = client.exec_command(bv_cmd)
>             for line in stderr.readlines():
>                 print line
>             for line in stdout.readlines():
>                 print line
> But problem here is client.exec_command(bv_cmd) waits for command to execute completely and then it returns to stdout,stderr. And I want to see the ouput from the command during its execution. Because my command takes long time for execution.


Are you certain that exec_command is what's waiting, and not readlines()?

ChrisA



More information about the Python-list mailing list