I want to read and process some large files line by line in python and output results in the terminal. I have gone through How do I read from stdin? and How do I write a unix filter in python?, but I am looking for methods which do not wait till the entire file is read into memory.
I would be using both of these commands:
cat fileName | python myScript1.py
python myScript2.py fileName