Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Tim Johnson Newsgroups: comp.lang.python Subject: Re: Using subprocess to capture a progress line Date: Wed, 11 Nov 2015 09:52:19 -0900 Organization: AkWebsoft Lines: 22 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: 8bit X-Trace: news.uni-berlin.de U5FzzqJqoGjzT1C7xZ9BtAYxCIfIsq/mLLKlJdeR15xg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'title.': 0.09; 'yeah,': 0.09; 'received:io': 0.16; 'received:psf.io': 0.16; 'redundant.': 0.16; 'wrote:': 0.16; 'module,': 0.18; 'working.': 0.18; '2015': 0.20; 'forgot': 0.23; 'cheers': 0.24; 'tim': 0.24; 'header:In- Reply-To:1': 0.24; 'module': 0.25; "i've": 0.25; 'header:User- Agent:1': 0.26; 'chris': 0.26; 'initial': 0.28; "i'm": 0.30; 'print': 0.30; 'code': 0.30; 'point': 0.33; 'could': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'say': 0.37; '(2)': 0.37; 'johnson': 0.37; 'things': 0.38; 'progress': 0.38; 'to:addr:python.org': 0.40; 'your': 0.60; 'sample': 0.63; 'matter.': 0.66; '17:16,': 0.84; 'subject:Using': 0.84; 'examine': 0.95 Mail-Followup-To: python-list@python.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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:98658 * Chris Warrick [151111 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 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