freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] Executing and capturing process ouput


From: Baptiste Lepilleur
Subject: [FR-devel] Executing and capturing process ouput
Date: Thu, 9 May 2002 17:23:56 +0200

    Hi all,
    I have a small question. As you may have noticed, the last version of
Practical Ruby allow the user to run a script.

    The current implementation use the backquote:

        output = `#{command} 2>&1`    # redirect stderr to stdout for
capture
where command is of the form:
        "ruby -I #{directory} #{scriptName}"

    while this work, it does not allow to print each line of the output to
the console window as soon as it is available. How does one do that ? My
guess is that it probably invole pipe, but I have no programming experience
with those (and even less in ruby).

    Baptiste.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]