python popen read stdout line by line