This question is in relation to:
python, subprocess: reading output from subprocess
If P is a subprocess started with a command along the lines of
import subprocess
P = subprocess.Popen ("command", stdout=subprocess.PIPE)
we can read the output P produces by P.stdout.readline (). This is a blocking read though. How can I check if there is output ready for reading (without blocking)?