Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Warrick Newsgroups: comp.lang.python Subject: Re: Using subprocess to capture a progress line Date: Wed, 11 Nov 2015 17:48:56 +0100 Lines: 17 Message-ID: References: <20151110224756.GA1944@mail.akwebsoft.com> <20151111161657.GE1944@mail.akwebsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de XDwaGDFnnOJ6pi4RoUf0VgOcUEN2WjIRUM/Caxrd+1XQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.138 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.73; '*S*': 0.00; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'module,': 0.18; '2015': 0.20; 'plain': 0.24; 'tim': 0.24; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'initial': 0.28; 'print': 0.30; 'code': 0.30; 'point': 0.33; 'received:google.com': 0.35; 'received:209.85': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; '(2)': 0.37; 'johnson': 0.37; 'things': 0.38; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'your': 0.60; 'sample': 0.63; '(is': 0.84; '17:16,': 0.84; 'subject:Using': 0.84 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:content-transfer-encoding; bh=EyeIKPEThcKhpY/14/3ivGEYmdg9Yy+7lfaQJJ8sfOo=; b=g0vGu54luejDT87Mt5HnrkNZvVvDl8H3oVopKRWsvtqEph0GuvPGpwjO1qY49SaMl8 FlyGLvYNjGNqgofXLCJECXjRAJZOQsfVr8xtNY3YquLd5fXmIrJ1CX38h7NARlTOXqrk mZGUkTEng+hUp7P+x/UqgJI1MVdL1bPx/xqfjQPvkvErQ5XAHn0add1vSybGW0QofEOy nwU6UW2h1AEXdHXtWHu4hn3NyJ/0GlYdOctC1k85MHMfKMGejy4LU3a/tUJYAo2N9Dss mxlomXV3+ro7LW8YpCJwHT5x01Wz7r7YDlIaV1uLVzrZg85LfRRUGYO3FyQDv3dOd44M dMRg== X-Received: by 10.13.244.199 with SMTP id d190mr11587863ywf.297.1447260536946; Wed, 11 Nov 2015 08:48:56 -0800 (PST) In-Reply-To: <20151111161657.GE1944@mail.akwebsoft.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98648 On 11 November 2015 at 17:16, Tim Johnson wrote: >> (2) [don=E2=80=99t do it] do you need to intercept the lines? If you don= =E2=80=99t set >> stderr=3D and stdout=3D, things will print just fine. > Got to try that before using the module, just for edification. At which point your initial code sample will become: ########### p =3D subprocess.Popen(list(args)) ########### (is list(args) really necessary? Wouldn=E2=80=99t plain Popen(args) just wo= rk?) --=20 Chris Warrick PGP: 5EAAEA16