nb_available(rdstd) > 0
On Mon, May 26, 2014 at 4:51 PM, Samuel Colvin <[email protected]> wrote: > readavailable blocks if it's called on pipe with nothing to read. How does > one check if a pipe has something to read before calling readavailable? > > In other words, > > rdstd, wrstd = redirect_stdout() > eval(statement) > if ________ > result = readavailable(rdstd) > end > redirect_stdout(STDOUT_OLD) > > Fill in the gap. > > I've tried a whole range of things but nothing is working, surely this has > a simple resolution? >
