3

I execute gradle with python subprocess:

proc = subprocess.Popen(["./gradlew", "assemble", stdout=subprocess.PIPE, stderr=subprocess.PIPE, )

Then I run two threads which read stdout and stderr:

class MyThread(QtCore.QThread):

    def run(self):
        while True:
            line = self.stream.readline()
            if line is not None and len(line) > 0:
                // process line
            else:
               break

I read log correct, but I can't read output like:

> Building 53% > :project:assemble

I tried replace readline with read, but it not helped.

If I execute:

./gradlew assemble | hd

I not see build progress in hd.

Is some solution for read this progress?

HotIceCream
  • 2,271
  • 2
  • 19
  • 27

0 Answers0