python process stdout readline () hangs