I was looking in google lot of example, but none work, I print to a file that passes through an outlet pipe ms-dos, but this throws me an error as if my file could not read sys.stdin, I put the code:
import sys
line = sys.stdin
for l in line.read():
print l
and ms-dos I write the following:
ping 127.0.0.1 | pipetest.py
console above shows me that I have mistake in the line of "for" and shows this:
IOError: [Errno 9] Bad file descriptor
I use python2.7, and windows.