How to read arguments from the shell, that some other program is streaming through a bash pipe? Secondly, is
print i a proper way to stream data to the environment?
However, I do not want one program to spawn the other, thej sut need to write and read from a fifo.
This will read one line at a time from stdin and print it (you'd obviously do something else with the line, such as split() it into tokens or parse it some other way):
import sys for line in sys.stdin: print line