Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17761
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <macsmith.us@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.025 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'mrab': 0.04; 'terminated': 0.07; 'output': 0.10; 'am,': 0.12; 'received:209.85.210.174': 0.13; 'received:mail-iy0-f174.google.com': 0.13; 'read()': 0.16; 'wrote:': 0.18; 'suggest': 0.20; 'header:In-Reply-To:1': 0.22; 'command': 0.24; 'lines': 0.30; 'hi,': 0.32; 'message- id:@gmail.com': 0.33; 'to:addr:python-list': 0.34; 'file.': 0.34; 'parse': 0.34; 'charset:us-ascii': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'using': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'header:Message-Id:1': 0.62; 'kindly': 0.65; 'received:10.10': 0.68; 'alternative.': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=oDd7nOC3+doqKt80TjibV5AJdDId2KZ2BfbWnfGqCF8=; b=cCsACEHNVMjiMLwRHqf1zYJbU0w9yZh1anxdIUz+Vd3VLcE/y9CBDh4nytYi7n1G6Z Fi6y49IijEa7CfwAUmtYWMUflYHAbRzOD1yn5WrN2W1nwaHJJDm7QBjihCosXDuJAYA4 4yM9+Ks1OebM2ZK6qcYVbZ//FDkDDkCIXYgP0= |
| Content-Type | text/plain; charset=us-ascii |
| Mime-Version | 1.0 (Apple Message framework v1251.1) |
| Subject | Re: reading multiline output |
| From | Mac Smith <macsmith.us@gmail.com> |
| In-Reply-To | <4EF3CF8B.4060005@mrabarnett.plus.com> |
| Date | Fri, 23 Dec 2011 06:37:12 +0530 |
| Content-Transfer-Encoding | quoted-printable |
| References | <79DF8234-67BF-4297-ACE6-8D091D05B3E9@gmail.com> <EAC763DC-04F6-497F-8455-1CF40A0ACC2E@gmail.com> <4EF3CF8B.4060005@mrabarnett.plus.com> |
| To | python-list@python.org |
| X-Mailer | Apple Mail (2.1251.1) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4007.1324602440.27778.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1324602440 news.xs4all.nl 6877 [2001:888:2000:d::a6]:46046 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:17761 |
Show key headers only | View raw
On 23-Dec-2011, at 6:17 AM, MRAB wrote: > On 23/12/2011 00:33, Mac Smith wrote: >> Hi, >> >> >> I have started HandBrakeCLI using subprocess.popen but the output is >> multiline and not terminated with \n so i am not able to read it >> using readline() while the HandBrakeCLI is running. kindly suggest >> some alternative. i have attached the output in a file. >> > The lines are terminated with \r, so read with read() and then split on > "\r". read() will read the complete output and than i will be able to parse it, i want to read the output of the command in realtime.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: reading multiline output Mac Smith <macsmith.us@gmail.com> - 2011-12-23 06:37 +0530
csiph-web