Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98648
| Path | csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Warrick <kwpolska@gmail.com> |
| 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 | <mailman.245.1447260540.16136.python-list@python.org> (permalink) |
| References | <20151110224756.GA1944@mail.akwebsoft.com> <CAMw+j7LZH44RnPXgP4XVDiv62uJ_iFmsEm17QpsmNBSDr=uvJw@mail.gmail.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 | <kwpolska@gmail.com> |
| 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 <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:98648 |
Show key headers only | View raw
On 11 November 2015 at 17:16, Tim Johnson <tim@akwebsoft.com> wrote:
>> (2) [don’t do it] do you need to intercept the lines? If you don’t set
>> stderr= and stdout=, 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 = subprocess.Popen(list(args))
###########
(is list(args) really necessary? Wouldn’t plain Popen(args) just work?)
--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Using subprocess to capture a progress line Chris Warrick <kwpolska@gmail.com> - 2015-11-11 17:48 +0100
csiph-web