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


Groups > comp.lang.python > #17760

Re: reading multiline output

Date 2011-12-23 00:47 +0000
From MRAB <python@mrabarnett.plus.com>
Subject Re: reading multiline output
References <79DF8234-67BF-4297-ACE6-8D091D05B3E9@gmail.com> <EAC763DC-04F6-497F-8455-1CF40A0ACC2E@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4006.1324601223.27778.python-list@python.org> (permalink)

Show all headers | View raw


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".

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: reading multiline output MRAB <python@mrabarnett.plus.com> - 2011-12-23 00:47 +0000

csiph-web