Possible Duplicate:
Non-blocking read on a subprocess.PIPE in python
Is it possible to test whether a Python file-like object has charaters after the current read position?
I'm trying to keep a subprocess.PIPE
flushed to my stdout, so am continuously running read(1)
on it. I only want to read if there will actually be something there for me to get (otherwise it hangs until something shows up).