[python] Getting realtime output using subprocess