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()

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.033
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'subject:()': 0.09; 'subject:command': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'stderr': 0.16; 'subject: \n ': 0.16; 'subject:which': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'command': 0.22; 'aug': 0.22; 'print': 0.22; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'here': 0.66; 'subject:. ': 0.67; 'execution.': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hmLfEuYpMzstnOG8k23CxUli98Ud+h93ihb7w6T8tsk=; b=V0eWQb7ocNDedHohZzlYSMOESBbvd7IX5vRi/rSH5osUR5muYWmwQ5nUv7zqq+URP8 oMDTtWrVy049Yrxmj0AOTIDuH90cd1d6IAGpWjKKhTfA4W88JZcCQGraeslMvzotkkaU 3+XvPD8q2VngOFQ0g/f8LWR+GdWw4IL7CJeklybm1UqxG+bwNHzcmEkRfWsq+9GwvRW8 rca6f+5gnkn7HWrgNvdfttNKSJR9bpK0p3igtFRE2bWNwfnl2aJbKwxDyOgFZFfhxQd2 sXqjS7+mJZolPUnr4PE+HWtLEFvUhwsmSvQSO/YCq8NA09rnMNxdQqjvR6MqdoW9m96H ep7Q==
MIME-Version 1.0
X-Received by 10.58.249.236 with SMTP id yx12mr3969630vec.25.1376211434640; Sun, 11 Aug 2013 01:57:14 -0700 (PDT)
In-Reply-To <c665ba05-2843-4e44-a6d0-b29d508fd9f4@googlegroups.com>
References <c665ba05-2843-4e44-a6d0-b29d508fd9f4@googlegroups.com>
Date Sun, 11 Aug 2013 09:57:14 +0100
Subject Re: Paramiko Help. Execute command to Interactive Shell which is opened by SSHClient()
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.470.1376211443.1251.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376211443 news.xs4all.nl 15989 [2001:888:2000:d::a6]:59392
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52370

Show key headers only | 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