3
$\begingroup$

Context. RunProcess allows us to execute a system command, and then read its "StandardOutput", "StandardError", etc. This is great for short-lived commands. But consider a long-running process, such as when we compile a large project. When we do this, we get lots of output in our system shell (many which might prompt us to stop the call and go do something else i.e. when we get a compilation warning). But we don't get to see this for a long while when we run RunProcess in Wolfram.

Question. Is there a way to RunProcess in Wolfram such that we get to console output stream live to our Wolfram notebook?

$\endgroup$
  • 3
    $\begingroup$ Have you looked at StartProcess? $\endgroup$ – Jason B. Sep 17 '19 at 17:42
  • 2
    $\begingroup$ Also check out ReadString, which can read to the EndOfBuffer (i.e. read what's available now then return) or EndOfFile (i.e. read until the process is done). This may be useful. $\endgroup$ – Szabolcs Sep 18 '19 at 8:34
  • 1
    $\begingroup$ What exactly are you looking for? People won't be able to help if you don't explain why the comments don't solve the problem. As far as I can tell, the answer is StartProcess + ReadString. Consider addressing comments before starting bounties. $\endgroup$ – Szabolcs Dec 30 '19 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.