Reading output from command line program - FLAC
I try to create a small program to handle the FLAC
<http://flac.sourceforge.net/> (commandline) encoder or decoder and
intend to read its command line output during the process like that:
Then I want to use some regular expressions to get the current progress
_flac_output = _flac_process.StandardError.ReadLine
of encoding/decoding and other info from the output strings which look
The problem is, that the FLAC encoder does not create any newlines
test:wav 13% complete, ratio=0,5
unlike cdrdao for example. It only refreshes the values for "ratio" and
"complete" in the same line. So when using the method above, the first
ReadLine happens not until _flac_process is finished. Then it reads all
lines at once, but that of course does not reflect the current status,
since it is already finished at this moment.
Does anyone know how to read the output in those cases?