Lately I was trying to write a simple python code which was supposed to communicate with another process using stdin. Here's what I tried so far:  
File start.py:
import sys
from subprocess import PIPE, Popen
proc = subprocess.Popen(["python3", "receive.py"], stdout=PIPE, stdin=PIPE, stderr=PIPE)
proc.stdin.write(b"foo\n")
proc.stdin.flush()
print(proc.stdout.readline())
File receive.py:
import sys
while True:
    receive = sys.stdin.readline().decode("utf-8")
    if receive == "END":
        break
    else:
        if receive != "":
            sys.stdout.write(receive + "-" + receive)
            sys.stdout.flush()
Unfortunately, when I python3 start.py as a result I get b''. How should I answer to the prompt of another process?
