Category "io-redirection"

How do I make the code which execute the python file (not itself) with input redirection?

I want to make call.py which execute main.py with input redirection of input.txt. In addition to that,I don't want to change the code of main.py. What I want

Combining mapfile, command redirection and exit status retrieval

I am reading a build command as so: mapfile -t make_out < <(2>&1 ./make.sh my_program) I would like to print the output kept in make_out only if t