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


Groups > comp.lang.python > #98648

Re: Using subprocess to capture a progress line

From Chris Warrick <kwpolska@gmail.com>
Newsgroups comp.lang.python
Subject Re: Using subprocess to capture a progress line
Date 2015-11-11 17:48 +0100
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>

Show all headers | 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


Thread

Re: Using subprocess to capture a progress line Chris Warrick <kwpolska@gmail.com> - 2015-11-11 17:48 +0100

csiph-web