Родительfrom subprocess import Popen, PIPE
process = Popen(["python", "child.py"], stdout=PIPE, stdin=PIPE, shell=True)
print(process.communicate(b"Hello!")[0].decode())
print(process.wait())
Дочернийuser = input()
if user == "Hello!":
print("Hello user!")