I want to pipe stdout from python to another program, but I am faceing a problem where my stdout is not piped.
I have it shortened down to a simple sample:
./my_python_script.py | cat
while true; do
You'll need to flush the stdout:
import time import sys while True: print("Hello!") sys.stdout.flush() time.sleep(1)