import subprocess
from time import sleep

with subprocess.Popen(["python3", "cronopunts.py", "5"],
                      stdout=subprocess.PIPE,
                      stdin=subprocess.PIPE
                      ) as p:
    p.stdin.write(b"\n")
    p.stdin.flush()
    while p.poll() == None:
            print('Rebut: ',
                  p.stdout.read1().decode('utf-8'))
            sleep(0.1)
