I\'ve problem to read from Standard input or pipe in python when the pipe is from a \"open\" (do not know right name) file.
I have as example pipetest.py:>
Try the next:
import sys import time k = 0 try: buff = '' while True: buff += sys.stdin.read(1) if buff.endswith('\n'): print buff[:-1] buff = '' k = k + 1 except KeyboardInterrupt: sys.stdout.flush() pass print k