Python Process Stdout Readline Function