code: def get_build_output(self, process):
          
  
          while True:
              output = process.stdout.readline()
              if output == b'' and process.poll() is not None:
                  if process.returncode > 0:
                      raise Exception("Compilation ended with an error"
                                      ".\nSTDERR\n%s\nSTDOUT\n%s" %
                                      (process.stderr.read(),
                                       process.stdout.read()))
                  return
              if output:
                  # Parse the output to get current and total tasks
                  # This assumes the progress displayed by waf is in the form
                  # [current/total]
                  matches = re.search(r'\[\s*(\d+?)/(\d+)\].*',
                                      output.strip().decode('utf-8'))
                  if matches is not None:
                      yield [int(matches.group(1)), int(matches.group(2))]
docs: Parse the output of the ns-3 build process to extract the information
          that is needed to draw the progress bar.
  
          Args:
              process: the subprocess instance to listen to.