I\'m kind of struggling to understand what is the python way of solving this simple problem.
My problem is quite simple. If you use the follwing code it will hang. T
For this kind of thing, the shell works a lot better than subprocess.
Write very simple Python apps which read from sys.stdin and write to sys.stdout.
Connect the simple apps together using a shell pipeline.
If you want, start the pipeline using subprocess or simply write a one-line shell script.
python part1.py | python part2.py
This is very, very efficient. It's also portable to all Linux (and Windows) as long as you keep it very simple.