python read subprocess stdout in real time