Using subprocess to capture a progress line

Tim Johnson tim at akwebsoft.com
Wed Nov 11 13:52:19 EST 2015


* Chris Warrick <kwpolska at gmail.com> [151111 07:54]:
> On 11 November 2015 at 17:16, Tim Johnson <tim at 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))
> ###########
> 
  Yeah, 'list is redundant.
  Progress is now showing, but I forgot to say that I've lost the
  original intent, and that was to examine each line so that I could
  pull out the title.

  No matter. I'm on the way to make the youtube_dl module working.
  cheers

-- 
Tim 
http://www.akwebsoft.com, http://www.tj49.com



More information about the Python-list mailing list