Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52370

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

References <c665ba05-2843-4e44-a6d0-b29d508fd9f4@googlegroups.com>
Date 2013-08-11 09:57 +0100
Subject Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient()
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.470.1376211443.1251.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Aug 8, 2013 at 8:20 AM, sagar varule <sagar.varule@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() sagar varule <sagar.varule@gmail.com> - 2013-08-08 00:20 -0700
  Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() sagar varule <sagar.varule@gmail.com> - 2013-08-10 22:18 -0700
    Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() Joshua Landau <joshua@landau.ws> - 2013-08-11 06:58 +0100
      Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() sagar varule <sagar.varule@gmail.com> - 2013-08-11 00:02 -0700
        Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() Joshua Landau <joshua@landau.ws> - 2013-08-11 08:10 +0100
  Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() Chris Angelico <rosuav@gmail.com> - 2013-08-11 09:57 +0100
  Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient() Joshua Landau <joshua@landau.ws> - 2013-08-11 11:10 +0100

csiph-web