Re: Using subprocess to capture a progress line

2015-11-11 Thread Tim Johnson
* Chris Warrick [15 07:54]: > On 11 November 2015 at 17:16, Tim Johnson 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

Re: Using subprocess to capture a progress line

2015-11-11 Thread Chris Warrick
On 11 November 2015 at 17:16, Tim Johnson 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: #

Re: Using subprocess to capture a progress line

2015-11-11 Thread Tim Johnson
* Chris Warrick [15 00:55]: > On 10 November 2015 at 23:47, Tim Johnson wrote: > > Using python 2.7.6 on ubuntu 14.04 <..> > There is no \n character at the end — which means that > p.stdout.readline() cannot return. In fact, if you printed repr() of > the line you read, you would get this:

Re: Using subprocess to capture a progress line

2015-11-11 Thread Chris Warrick
On 10 November 2015 at 23:47, Tim Johnson wrote: > Using python 2.7.6 on ubuntu 14.04 > The application in question is run with bash and gnome-terminal : > > I've written a command-line "wrapper" for youtube-dl, executing > youtube-dl as a subprocess. > > --

Re: Using subprocess to capture a progress line

2015-11-10 Thread Tim Johnson
* Tim Johnson [151110 14:55]: > * Chris Angelico [151110 14:35]: > > On Wed, Nov 11, 2015 at 9:47 AM, Tim Johnson wrote: > > > I've written a command-line "wrapper" for youtube-dl, executing > > is implemented in Python, you might find it easier to "pip install > > youtube_dl" and work with the

Re: Using subprocess to capture a progress line

2015-11-10 Thread Tim Johnson
* Tim Johnson [151110 14:55]: > * Chris Angelico [151110 14:35]: > > On Wed, Nov 11, 2015 at 9:47 AM, Tim Johnson wrote: > > > I've written a command-line "wrapper" for youtube-dl, executing > > > youtube-dl as a subprocess. > > > > > > ---

Re: Using subprocess to capture a progress line

2015-11-10 Thread Tim Johnson
* Chris Angelico [151110 14:35]: > On Wed, Nov 11, 2015 at 9:47 AM, Tim Johnson wrote: > > I've written a command-line "wrapper" for youtube-dl, executing > > youtube-dl as a subprocess. > > > > -- > > youtube-dl reports download pro

Re: Using subprocess to capture a progress line

2015-11-10 Thread Chris Angelico
On Wed, Nov 11, 2015 at 9:47 AM, Tim Johnson wrote: > I've written a command-line "wrapper" for youtube-dl, executing > youtube-dl as a subprocess. > > -- > youtube-dl reports download progress on one line. I.E. the line is > overwrit