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: 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: References: 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Thu, Aug 8, 2013 at 8:20 AM, sagar varule 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