Reading output from command line program - FLAC

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • floele@gmail.com

    #1

    Reading output from command line program - FLAC

    Hi.

    I try to create a small program to handle the FLAC
    <http://flac.sourceforg e.net/> (commandline) encoder or decoder and
    intend to read its command line output during the process like that:

    while (...)
    _flac_output = _flac_process.S tandardError.Re adLine
    End While


    Then I want to use some regular expressions to get the current progress
    of encoding/decoding and other info from the output strings which look
    like that:

    test:wav 13% complete, ratio=0,5

    The problem is, that the FLAC encoder does not create any newlines
    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?

Working...