triqs.utility.redirect.T.run

T.run()[source]

Run the pipe-pumping loop until stop() is called.

Each iteration sleeps for one second to let the OS buffer up output, then attempts a non-blocking os.read of up to 10000 bytes from the pipe and writes them to sys.stdout. On exit the original file descriptor 1 is restored from oldhandle and the pipe is closed.