[python] read subprocess stdout line by line