We have couple of huge files (greater than size of RAM) in disk. I want to read them line by line in python and output results in terminal. I have gone through [1] and [2], 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
[1] How do you read from stdin in Python? [2] How do I write a unix filter in python?