1

I have a task something defined in waf which uses run_str insted of def run(self). How can I catch the output (stdout, stderr and returncode) to further process it.

I know I could place it all in in def run(self), start the task manually, catch the output and process it. But for the sake of simplicity I would like to keep the run_str and do the output processing in an extra function.

actual implementation:

class something(Task.Task):
    run_str = "${PROGRAM} ${ARGS}"

So the desired output would be:

class something(Task.Task):
    run_str = "${PROGRAM} ${ARGS}"

    def check_output(self):
       pass
       # stdout, stderr and returncode processing here
neuro
  • 14,948
  • 3
  • 36
  • 59
wafwafwaf
  • 191
  • 9

0 Answers0