python read stdout without blocking